gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r11705 - in Extractor/src: main plugins


From: gnunet
Subject: [GNUnet-SVN] r11705 - in Extractor/src: main plugins
Date: Sun, 13 Jun 2010 01:44:44 +0200

Author: grothoff
Date: 2010-06-13 01:44:44 +0200 (Sun, 13 Jun 2010)
New Revision: 11705

Modified:
   Extractor/src/main/extract.c
   Extractor/src/main/extractor.c
   Extractor/src/plugins/nsfe_extractor.c
   Extractor/src/plugins/png_extractor.c
Log:
stuff

Modified: Extractor/src/main/extract.c
===================================================================
--- Extractor/src/main/extract.c        2010-06-12 23:34:26 UTC (rev 11704)
+++ Extractor/src/main/extract.c        2010-06-12 23:44:44 UTC (rev 11705)
@@ -703,7 +703,13 @@
          return -1;
        }                       /* end of parsing commandline */
     }                          /* while (1) */
-
+  if (optind < 0)
+    {
+      fprintf (stderr,
+              "Unknown error parsing options\n");
+      free (print);
+      return -1;
+    }
   if (argc - optind < 1)
     {
       fprintf (stderr,

Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c      2010-06-12 23:34:26 UTC (rev 11704)
+++ Extractor/src/main/extractor.c      2010-06-12 23:44:44 UTC (rev 11705)
@@ -1463,8 +1463,8 @@
       perror ("fdopen");
       (void) kill (plugin->cpid, SIGKILL);
       waitpid (plugin->cpid, &status, 0);
-      close (p1[0]);
-      close (p2[1]);
+      close (p1[1]);
+      close (p2[0]);
       plugin->cpid = -1;
       plugin->flags = EXTRACTOR_OPTION_DISABLED;
       return;

Modified: Extractor/src/plugins/nsfe_extractor.c
===================================================================
--- Extractor/src/plugins/nsfe_extractor.c      2010-06-12 23:34:26 UTC (rev 
11704)
+++ Extractor/src/plugins/nsfe_extractor.c      2010-06-12 23:44:44 UTC (rev 
11705)
@@ -159,11 +159,10 @@
   for (left = size; left > 0; left -= length)
     {
       title = nsfestring (&data[size - left], left);
-      if (title != NULL)
-       {
-         length = strlen (title) + 1;
-         ADDF (title, EXTRACTOR_METATYPE_TITLE);
-       }
+      if (title == NULL)
+       return 0;       
+      length = strlen (title) + 1;
+      ADDF (title, EXTRACTOR_METATYPE_TITLE);
     }
   return 0;
 }

Modified: Extractor/src/plugins/png_extractor.c
===================================================================
--- Extractor/src/plugins/png_extractor.c       2010-06-12 23:34:26 UTC (rev 
11704)
+++ Extractor/src/plugins/png_extractor.c       2010-06-12 23:44:44 UTC (rev 
11705)
@@ -100,6 +100,8 @@
   if (off >= length)
     return 0;                /* failed to find '\0' */
   keyword = EXTRACTOR_common_convert_to_utf8 (&data[off], length - off, 
"ISO-8859-1");
+  if (keyword == NULL)
+    return 0;
   i = 0;
   ret = 0;
   while (tagmap[i].name != NULL)
@@ -249,8 +251,8 @@
   int i;
   char *buf;
   uLongf bufLen;
+  int zret;
   int ret;
-  int zret;
 
   data += 4;
   off = stnlen (data, length) + 1;
@@ -259,7 +261,7 @@
   if (data[off] != 0)
     return 0;                /* compression method must be 0 */
   off++;
-
+  ret = 0;
   bufLen = 1024 + 2 * (length - off);
   while (1)
     {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]