diff libmpdemux/asf_mmst_streaming.c @ 15173:424386614ad5

Fix potential buffer overflow for urls with more than 20 streams
author rtognimp
date Fri, 15 Apr 2005 23:31:57 +0000
parents 38ec64821910
children ed74657f25b1
line wrap: on
line diff
--- a/libmpdemux/asf_mmst_streaming.c	Fri Apr 15 23:30:44 2005 +0000
+++ b/libmpdemux/asf_mmst_streaming.c	Fri Apr 15 23:31:57 2005 +0000
@@ -334,8 +334,12 @@
 
       printf ("stream object, stream id: %d\n", stream_id);
 
+      if (num_stream_ids < 20) {
       stream_ids[num_stream_ids] = stream_id;
       num_stream_ids++;
+      } else {
+        printf ("too many id, stream skipped");
+      }
       
     } else {
       printf ("unknown object\n");