diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-07 17:02:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-07 19:59:00 +0200 |
commit | 192efcf76884f73c3f3d217862ac9e29afc94924 (patch) | |
tree | 916184ad3d8a9e80a0868ff4aba60ef786435cce /libavcodec/h264_ps.c | |
parent | 2d0b4bc4cf92dd961dbafbff3f1f4a9e08a9565b (diff) | |
download | ffmpeg-streaming-192efcf76884f73c3f3d217862ac9e29afc94924.zip ffmpeg-streaming-192efcf76884f73c3f3d217862ac9e29afc94924.tar.gz |
h264_ps: check log2_max_frame_num for validity.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index d9ed178..82b4e67 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -371,6 +371,12 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){ } sps->log2_max_frame_num= get_ue_golomb(&s->gb) + 4; + if (sps->log2_max_frame_num < 4 || sps->log2_max_frame_num > 16) { + av_log(h->s.avctx, AV_LOG_ERROR, "illegal log2_max_frame_num %d\n", + sps->log2_max_frame_num); + goto fail; + } + sps->poc_type= get_ue_golomb_31(&s->gb); if(sps->poc_type == 0){ //FIXME #define |