[xiph-commits] r3813 - liboggz/trunk/src/tools/oggz-chop

conrad at svn.annodex.net conrad at svn.annodex.net
Fri Dec 5 19:04:46 PST 2008


Author: conrad
Date: 2008-12-05 19:04:45 -0800 (Fri, 05 Dec 2008)
New Revision: 3813

Modified:
   liboggz/trunk/src/tools/oggz-chop/oggz-chop.c
Log:
oggz-chop: add sanity-check for initialization state


Modified: liboggz/trunk/src/tools/oggz-chop/oggz-chop.c
===================================================================
--- liboggz/trunk/src/tools/oggz-chop/oggz-chop.c	2008-12-05 23:33:56 UTC (rev 3812)
+++ liboggz/trunk/src/tools/oggz-chop/oggz-chop.c	2008-12-06 03:04:45 UTC (rev 3813)
@@ -743,6 +743,11 @@
 {
   OGGZ * oggz;
 
+  if (state == NULL || state->infilename == NULL) {
+    fprintf (stderr, "oggz-chop: Initialization state invalid\n");
+    return -1;
+  }
+
   state_init (state);
 
   if (strcmp (state->infilename, "-") == 0) {



More information about the commits mailing list