summaryrefslogtreecommitdiff
path: root/gst/isomp4
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-05-02 09:49:32 +0100
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-05-02 09:49:32 +0100
commitb692539b55063f22acb4365af9891b432e9501d2 (patch)
treef9d8dc2c1cc9589752c1f1d35b2e9c3b831312cc /gst/isomp4
parent436c8c11a0847a84e67d3ac93f512b031c02e33e (diff)
qtdemux: guard against invalid frame size to avoid division by 0
Coverity 1139690
Diffstat (limited to 'gst/isomp4')
-rw-r--r--gst/isomp4/qtdemux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 8732f1edb..613edad57 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -3885,6 +3885,9 @@ gst_qtdemux_clip_buffer (GstQTDemux * qtdemux, QtDemuxStream * stream,
} else
goto wrong_type;
+ if (frame_size <= 0)
+ goto bad_frame_size;
+
/* we can only clip if we have a valid pts */
pts = GST_BUFFER_PTS (buf);
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (pts)))
@@ -3953,6 +3956,11 @@ wrong_type:
GST_DEBUG_OBJECT (qtdemux, "unknown stream type");
return buf;
}
+bad_frame_size:
+ {
+ GST_DEBUG_OBJECT (qtdemux, "bad frame size");
+ return buf;
+ }
no_pts:
{
GST_DEBUG_OBJECT (qtdemux, "no pts on buffer");