summaryrefslogtreecommitdiff
path: root/gst/avi
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2017-01-20 17:16:10 +0200
committerSebastian Dröge <sebastian@centricular.com>2017-01-20 17:16:10 +0200
commit4f478357ae21efd299735f678889a60ea8291d88 (patch)
treeaee2d3fe24d47ae517e59fca2ac8e2501bca848b /gst/avi
parent32d9f3c158b58984be7731434df619131c0736f7 (diff)
downloadgstreamer-plugins-good-4f478357ae21efd299735f678889a60ea8291d88.tar.gz
avidemux: Stop reading a ncdt sub-tag if it goes behind the surrounding tag
https://bugzilla.gnome.org/show_bug.cgi?id=777532
Diffstat (limited to 'gst/avi')
-rw-r--r--gst/avi/gstavidemux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index d7afd1e71..3e21dbd5d 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -3914,6 +3914,9 @@ gst_avi_demux_parse_ncdt (GstAviDemux * avi, GstBuffer * buf,
ptr += 4;
left -= 4;
+ if (sub_size > tsize)
+ break;
+
GST_DEBUG_OBJECT (avi, "sub-tag %u, size %u", sub_tag, sub_size);
/* http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#NCTG
* for some reason the sub_tag has a +2 offset