summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-11-23 10:51:17 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-11-23 10:53:40 +0200
commit1dbfef93d6aca245f1793f9b5348a9dbcd02be97 (patch)
tree4e49dcc767a54b2d6b5a22c630e9800e8f7b2910
parent4a0214335fb71b6e85759eb1e391659a3ba60cba (diff)
h264parse: Ensure codec_data has the required size when reading number of SPS
https://bugzilla.gnome.org/show_bug.cgi?id=774896
-rw-r--r--gst/videoparsers/gsth264parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index be2f46288..e4dcbc3f0 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -2583,6 +2583,10 @@ gst_h264_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
off = nalu.offset + nalu.size;
}
+ if (off >= size) {
+ gst_buffer_unmap (codec_data, &map);
+ goto avcc_too_small;
+ }
num_pps = data[off];
off++;