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

conrad at svn.annodex.net conrad at svn.annodex.net
Fri Dec 5 15:33:56 PST 2008


Author: conrad
Date: 2008-12-05 15:33:56 -0800 (Fri, 05 Dec 2008)
New Revision: 3812

Modified:
   liboggz/trunk/src/tools/oggz-chop/cgi.c
Log:
oggz-chop: check if PATH_TRANSLATED is defined, warn about CGI configuration error otherwise (to stderr, ie. web server logs)


Modified: liboggz/trunk/src/tools/oggz-chop/cgi.c
===================================================================
--- liboggz/trunk/src/tools/oggz-chop/cgi.c	2008-12-04 21:23:01 UTC (rev 3811)
+++ liboggz/trunk/src/tools/oggz-chop/cgi.c	2008-12-05 23:33:56 UTC (rev 3812)
@@ -146,6 +146,11 @@
 
   /*photo_init (&params->in, path_translated);*/
 
+  if (path_translated == NULL) {
+    fprintf (stderr, "oggz-chop: CGI configuration error: PATH_TRANSLATED undefined\n");
+    return -1;
+  }
+
   /* Get Last-Modified time */
   if (stat (path_translated, &statbuf) == -1) {
     switch (errno) {



More information about the commits mailing list