From b95ddd55cd27f8d25ec3bb9fb6f16c8bb57cd480 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 12 Sep 2013 15:07:48 +0200 Subject: [PATCH] flacparse: Make sure we have enough data to read image tags Thanks to iputinei for reporting this on IRC. --- gst/audioparsers/gstflacparse.c | 3 +++ 1 file changed, 3 insertions(+) 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 (); -- 2.7.4