jpegparse: fix invalid memory access

See bug #608998.
This commit is contained in:
Tim-Philipp Müller 2010-02-17 01:29:40 +00:00
parent 8db9136e89
commit 3e45e6ba9f

View file

@ -318,7 +318,7 @@ gst_jpeg_parse_match_next_marker (const guint8 * data, guint size)
if (G_UNLIKELY (gst_jpeg_parse_parse_tag_has_entropy_segment (tag))) {
while (!(data[marker_len] == 0xff && data[marker_len + 1] != 0x00)) {
++marker_len;
if (G_UNLIKELY (marker_len > size))
if (G_UNLIKELY (marker_len + 2 > size))
goto need_more_data;
}
}