changeset 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 56541efe420b
children f9cca77bc910
files libmpdemux/asf_mmst_streaming.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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");