[xiph-commits] r3458 - liboggz/trunk/src/tools

conrad at svn.annodex.net conrad at svn.annodex.net
Thu Feb 14 03:26:44 PST 2008


Author: conrad
Date: 2008-02-14 03:26:43 -0800 (Thu, 14 Feb 2008)
New Revision: 3458

Modified:
   liboggz/trunk/src/tools/skeleton.c
Log:
skeleton.c: fix potential segfault in use of memset in previous patch


Modified: liboggz/trunk/src/tools/skeleton.c
===================================================================
--- liboggz/trunk/src/tools/skeleton.c	2008-02-14 10:41:21 UTC (rev 3457)
+++ liboggz/trunk/src/tools/skeleton.c	2008-02-14 11:26:43 UTC (rev 3458)
@@ -115,7 +115,7 @@
 
     if (!fp || !op) return -1;
 
-    memset(&op, 0, sizeof(op));
+    memset(op, 0, sizeof(*op));
     op->packet = _ogg_calloc(FISHEAD_SIZE, sizeof(unsigned char));
     if (!op->packet) return -1;
 
@@ -149,7 +149,7 @@
 
     packet_size = FISBONE_SIZE + fp->current_header_size;
 
-    memset (&op, 0, sizeof (op));       
+    memset (op, 0, sizeof (*op));       
     op->packet = _ogg_calloc (packet_size, sizeof(unsigned char));
     if (!op->packet) return -1;
 



More information about the commits mailing list