From dfa2df1c887d6777308e31596ad9154106088280 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Wed, 30 Apr 2014 11:52:10 +0100 Subject: [PATCH] rtpjpegdepay: sanity check for NULL qtable Can happen (at least in crafted stream) Coverity 1208778 --- gst/rtp/gstrtpjpegdepay.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/rtp/gstrtpjpegdepay.c b/gst/rtp/gstrtpjpegdepay.c index 04d010492e..5463283e79 100644 --- a/gst/rtp/gstrtpjpegdepay.c +++ b/gst/rtp/gstrtpjpegdepay.c @@ -665,6 +665,12 @@ gst_rtp_jpeg_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) goto no_qtable; } } + + /* I think we can get here with a NULL qtable, so make sure we don't + go dereferencing it in MakeHeaders if we do */ + if (!qtable) + goto no_qtable; + /* max header length, should be big enough */ outbuf = gst_buffer_new_and_alloc (1000); gst_buffer_map (outbuf, &map, GST_MAP_WRITE);