gst/mpegaudioparse/gstmpegaudioparse.c: Fix buffer overflow read error.

Original commit message from CVS:
* gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain):
Fix buffer overflow read error.
This commit is contained in:
Ronald S. Bultje 2004-03-24 04:21:38 +00:00
parent b0b16e9a3d
commit 9622db1d4f
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-03-23 Ronald Bultje <rbultje@ronald.bitfreak.net>
* gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain):
Fix buffer overflow read error.
2004-03-23 Ronald Bultje <rbultje@ronald.bitfreak.net>
* ext/alsa/gstalsa.h:

View file

@ -330,7 +330,7 @@ gst_mp3parse_chain (GstPad * pad, GstData * _data)
GST_DEBUG ("mp3parse: offset %ld, size %ld ", offset, size);
/* search for a possible start byte */
for (; ((data[offset] != 0xff) && (offset < size)); offset++)
for (; ((offset < size - 4) && (data[offset] != 0xff)); offset++)
skipped++;
if (skipped && !mp3parse->in_flush) {
GST_DEBUG ("mp3parse: **** now at %ld skipped %d bytes", offset, skipped);