From 845f850c41c0c7b684e098f2c06861330e971df7 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 24 Mar 2004 04:21:38 +0000 Subject: 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. --- ChangeLog | 5 +++++ gst/mpegaudioparse/gstmpegaudioparse.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 330d3aa5..bbb22ddc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-03-23 Ronald Bultje + + * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain): + Fix buffer overflow read error. + 2004-03-23 Ronald Bultje * ext/alsa/gstalsa.h: diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c index 4e5b9b00..a4152dea 100644 --- a/gst/mpegaudioparse/gstmpegaudioparse.c +++ b/gst/mpegaudioparse/gstmpegaudioparse.c @@ -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); -- cgit v1.2.1