[MPlayer-cvslog] r19164 - trunk/libmpcodecs/ad_hwmpa.c

nicodvb subversion at mplayerhq.hu
Sun Jul 23 10:35:18 CEST 2006


Author: nicodvb
Date: Sun Jul 23 10:35:18 2006
New Revision: 19164

Modified:
   trunk/libmpcodecs/ad_hwmpa.c

Log:
in decode_audio() memset(0) unused memory in buf before returning

Modified: trunk/libmpcodecs/ad_hwmpa.c
==============================================================================
--- trunk/libmpcodecs/ad_hwmpa.c	(original)
+++ trunk/libmpcodecs/ad_hwmpa.c	Sun Jul 23 10:35:18 2006
@@ -99,7 +99,7 @@
 			l = min(sh->a_in_buffer_size - sh->a_in_buffer_len, start + len);
 			l = demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len], l);
 			if(! l)
-				return tot;
+				break;
 			sh->a_in_buffer_len += l;
 			continue;
 		}
@@ -112,6 +112,7 @@
 		tot2 += spf * 2 * chans;
 	}
 
+	memset(&buf[tot], 0, tot2-tot);
 	return tot2;
 }
 



More information about the MPlayer-cvslog mailing list