[NUT-devel] [nut]: r143 - trunk/libnut/demuxer.c

ods15 subversion at mplayerhq.hu
Sat Sep 23 21:10:00 CEST 2006


Author: ods15
Date: Sat Sep 23 21:09:58 2006
New Revision: 143

Modified:
   trunk/libnut/demuxer.c

Log:
prevent malloc overflow by not using uint64_t


Modified: trunk/libnut/demuxer.c
==============================================================================
--- trunk/libnut/demuxer.c	(original)
+++ trunk/libnut/demuxer.c	Sat Sep 23 21:09:58 2006
@@ -201,8 +201,8 @@
 	int err;
 	if ((err = get_v(in, &tmp))) return err;
 	*len = tmp;
-	*buf = alloc->realloc(*buf, tmp);
-	if (get_data(in, tmp, *buf) != tmp) return buf_eof(in);
+	*buf = alloc->realloc(*buf, *len);
+	if (get_data(in, *len, *buf) != tmp) return buf_eof(in);
 	return 0;
 }
 



More information about the NUT-devel mailing list