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

conrad at svn.annodex.net conrad at svn.annodex.net
Wed Jul 23 14:53:59 PDT 2008


Author: conrad
Date: 2008-07-23 14:53:58 -0700 (Wed, 23 Jul 2008)
New Revision: 3664

Modified:
   liboggz/trunk/src/tools/skeleton.c
Log:
skeleton.c::ogg_from_fisbone(): avoid memcpy of NULL fp->message_header_fields.
Fixes ticket:408, reported by j^


Modified: liboggz/trunk/src/tools/skeleton.c
===================================================================
--- liboggz/trunk/src/tools/skeleton.c	2008-07-16 12:11:56 UTC (rev 3663)
+++ liboggz/trunk/src/tools/skeleton.c	2008-07-23 21:53:58 UTC (rev 3664)
@@ -163,8 +163,10 @@
     *((ogg_int64_t*)(op->packet+36)) = _le_64 (fp->start_granule); /* start granule */
     *((ogg_uint32_t*)(op->packet+44)) = _le_32 (fp->preroll); /* preroll, for theora its 0 */
     *(op->packet+48) = fp->granule_shift; /* granule shift */
-    memcpy((op->packet+FISBONE_SIZE), fp->message_header_fields, fp->current_header_size);
+    if (fp->message_header_fields)
+      memcpy((op->packet+FISBONE_SIZE), fp->message_header_fields, fp->current_header_size);
 
+
     op->b_o_s = 0;
     op->e_o_s = 0;
     op->bytes = packet_size; /* size of the packet in bytes */



More information about the commits mailing list