[FFmpeg-cvslog] avcodec/hevc_sei: Fix null dereference in decode_pic_timing()

Michael Niedermayer git at videolan.org
Sun Nov 3 02:30:10 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov  3 01:53:19 2013 +0100| [8a701ef7ddbb2d80ef77b14287d286fc9760f131] | committer: Michael Niedermayer

avcodec/hevc_sei: Fix null dereference in decode_pic_timing()

Fixes Ticket3106

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a701ef7ddbb2d80ef77b14287d286fc9760f131
---

 libavcodec/hevc_sei.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index a6a5dfc..1770eb5 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -78,10 +78,11 @@ static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
 static int decode_pic_timing(HEVCContext *s)
 {
     GetBitContext *gb = &s->HEVClc->gb;
-    HEVCSPS *sps = (HEVCSPS*)s->sps_list[s->active_seq_parameter_set_id]->data;
+    HEVCSPS *sps;
 
-    if (!sps)
+    if (!s->sps_list[s->active_seq_parameter_set_id])
         return(AVERROR(ENOMEM));
+    sps = (HEVCSPS*)s->sps_list[s->active_seq_parameter_set_id]->data;
 
     if (sps->vui.frame_field_info_present_flag) {
         int pic_struct = get_bits(gb, 4);



More information about the ffmpeg-cvslog mailing list