[xiph-commits] r17072 - trunk/vorbis-tools/ogginfo

giles at svn.xiph.org giles at svn.xiph.org
Thu Mar 25 22:07:26 PDT 2010


Author: giles
Date: 2010-03-25 22:07:26 -0700 (Thu, 25 Mar 2010)
New Revision: 17072

Modified:
   trunk/vorbis-tools/ogginfo/theora.c
Log:
Only clean the theora_comment struct if we're passed a non-NULL pointer.

The implementation of theora_comment_clear() in ogginfo performed a
NULL check before deferencing members to free() them, but zeroed the
indicated memory regardless.


Modified: trunk/vorbis-tools/ogginfo/theora.c
===================================================================
--- trunk/vorbis-tools/ogginfo/theora.c	2010-03-26 05:00:56 UTC (rev 17071)
+++ trunk/vorbis-tools/ogginfo/theora.c	2010-03-26 05:07:26 UTC (rev 17072)
@@ -111,8 +111,8 @@
     if(tc->user_comments)_ogg_free(tc->user_comments);
     if(tc->comment_lengths)_ogg_free(tc->comment_lengths);
     if(tc->vendor)_ogg_free(tc->vendor);
+    memset(tc,0,sizeof(*tc));
   }
-  memset(tc,0,sizeof(*tc));
 }
 
 static int _theora_unpack_comment(theora_comment *tc, oggpack_buffer *opb){



More information about the commits mailing list