summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-28 11:01:11 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-10-28 11:08:58 +0100
commitac3fa95e73e52179c52cb0f117c06cdbaced6893 (patch)
treea7bc3c3a1e740306c9090445b04c34f84a36400c
parentbdd3a746775f17f315b411105cb85f639cf036d1 (diff)
parent94603feb1b3ad01a821a1a1cef1570b13f471821 (diff)
Merge commit '94603feb1b3ad01a821a1a1cef1570b13f471821'
* commit '94603feb1b3ad01a821a1a1cef1570b13f471821': h264_ps: when parsing a VUI fails, only abort when explode is set Merge only for metadata, ignoring invalid data can put the context into an invalid state and can possibly be used for remote code execution exploits. Also we support all non standard VUIs that have been reported so ignoring parsing failure makes no sense for us unless theres some issue that has not been reported Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264_ps.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index e667359e2b..a06e3dd65b 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -520,9 +520,11 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
}
sps->vui_parameters_present_flag = get_bits1(&h->gb);
- if (sps->vui_parameters_present_flag)
- if (decode_vui_parameters(h, sps) < 0)
+ if (sps->vui_parameters_present_flag) {
+ int ret = decode_vui_parameters(h, sps);
+ if (ret < 0)
goto fail;
+ }
if (!sps->sar.den)
sps->sar.den = 1;