Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > f291a731b3f7303392639449b04f1160 > files > 14

mplayer-1.0-1.rc2.18.2mdv2009.0.src.rpm

--- mplayer-1.0~rc1.orig/stream/realrtsp/sdpplin.c
+++ mplayer-1.0~rc1/stream/realrtsp/sdpplin.c
@@ -330,7 +330,8 @@
     
     if(filter(data,"a=StreamCount:integer;",&buf)) {
       desc->stream_count=(unsigned int)atoi(buf);
-      desc->stream=malloc(sizeof(sdpplin_stream_t*)*desc->stream_count);
+      desc->stream=calloc(desc->stream_count, sizeof(sdpplin_stream_t*));
+      if (!desc->stream) desc->stream_count = 0;
       handled=1;
       data=nl(data);
     }