From: Sebastian Dröge Date: Thu, 12 Sep 2013 13:07:48 +0000 (+0200) Subject: flacparse: Make sure we have enough data to read image tags X-Git-Tag: 1.19.3~509^2~5337 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b95ddd55cd27f8d25ec3bb9fb6f16c8bb57cd480;p=platform%2Fupstream%2Fgstreamer.git flacparse: Make sure we have enough data to read image tags Thanks to iputinei for reporting this on IRC. --- diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c index a5b294a..8756942 100644 --- a/gst/audioparsers/gstflacparse.c +++ b/gst/audioparsers/gstflacparse.c @@ -1129,6 +1129,9 @@ gst_flac_parse_handle_picture (GstFlacParse * flacparse, GstBuffer * buffer) if (!gst_byte_reader_get_uint32_be (&reader, &img_len)) goto error; + if (gst_byte_reader_get_pos (&reader) + img_len > map.size) + goto error; + if (!flacparse->tags) flacparse->tags = gst_tag_list_new_empty ();