From 99bf786886625c3a44cae2cf3833f9a54311515e Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Thu, 21 Apr 2005 19:02:43 +0000 Subject: **BUGFIX** MMS buffer overflow fix ported over from MPlayer CVS patchset: 7479 CVS date: 2005/04/21 19:02:43 --- src/input/mms.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/input/mms.c b/src/input/mms.c index b0a4a82d3..f98e37605 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.c,v 1.55 2005/01/18 23:25:34 tmattern Exp $ + * $Id: mms.c,v 1.56 2005/04/21 19:02:43 mroi Exp $ * * MMS over TCP protocol * based on work from major mms @@ -583,9 +583,13 @@ static void interp_asf_header (mms_t *this) { lprintf ("stream object, stream id: %d, type: %d, encrypted: %d\n", stream_id, type, encrypted); - this->stream_types[stream_id] = type; - this->stream_ids[this->num_stream_ids] = stream_id; - this->num_stream_ids++; + if (this->num_stream_ids < ASF_MAX_NUM_STREAMS && stream_id < ASF_MAX_NUM_STREAMS) { + this->stream_types[stream_id] = type; + this->stream_ids[this->num_stream_ids] = stream_id; + this->num_stream_ids++; + } else { + lprintf ("too many streams, skipping\n"); + } } break; -- cgit v1.2.3