diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/extract.c | 8 | ||||
-rw-r--r-- | src/main/extractor.c | 4 | ||||
-rw-r--r-- | src/plugins/nsfe_extractor.c | 9 | ||||
-rw-r--r-- | src/plugins/png_extractor.c | 6 |
4 files changed, 17 insertions, 10 deletions
diff --git a/src/main/extract.c b/src/main/extract.c index 5f6fa4c..17667af 100644 --- a/src/main/extract.c +++ b/src/main/extract.c | |||
@@ -703,7 +703,13 @@ main (int argc, char *argv[]) | |||
703 | return -1; | 703 | return -1; |
704 | } /* end of parsing commandline */ | 704 | } /* end of parsing commandline */ |
705 | } /* while (1) */ | 705 | } /* while (1) */ |
706 | 706 | if (optind < 0) | |
707 | { | ||
708 | fprintf (stderr, | ||
709 | "Unknown error parsing options\n"); | ||
710 | free (print); | ||
711 | return -1; | ||
712 | } | ||
707 | if (argc - optind < 1) | 713 | if (argc - optind < 1) |
708 | { | 714 | { |
709 | fprintf (stderr, | 715 | fprintf (stderr, |
diff --git a/src/main/extractor.c b/src/main/extractor.c index 109e256..0d9d7c2 100644 --- a/src/main/extractor.c +++ b/src/main/extractor.c | |||
@@ -1463,8 +1463,8 @@ start_process (struct EXTRACTOR_PluginList *plugin) | |||
1463 | perror ("fdopen"); | 1463 | perror ("fdopen"); |
1464 | (void) kill (plugin->cpid, SIGKILL); | 1464 | (void) kill (plugin->cpid, SIGKILL); |
1465 | waitpid (plugin->cpid, &status, 0); | 1465 | waitpid (plugin->cpid, &status, 0); |
1466 | close (p1[0]); | 1466 | close (p1[1]); |
1467 | close (p2[1]); | 1467 | close (p2[0]); |
1468 | plugin->cpid = -1; | 1468 | plugin->cpid = -1; |
1469 | plugin->flags = EXTRACTOR_OPTION_DISABLED; | 1469 | plugin->flags = EXTRACTOR_OPTION_DISABLED; |
1470 | return; | 1470 | return; |
diff --git a/src/plugins/nsfe_extractor.c b/src/plugins/nsfe_extractor.c index 08c0509..ffd5ded 100644 --- a/src/plugins/nsfe_extractor.c +++ b/src/plugins/nsfe_extractor.c | |||
@@ -159,11 +159,10 @@ libextractor_nsfe_tlbl_extract(const char *data, | |||
159 | for (left = size; left > 0; left -= length) | 159 | for (left = size; left > 0; left -= length) |
160 | { | 160 | { |
161 | title = nsfestring (&data[size - left], left); | 161 | title = nsfestring (&data[size - left], left); |
162 | if (title != NULL) | 162 | if (title == NULL) |
163 | { | 163 | return 0; |
164 | length = strlen (title) + 1; | 164 | length = strlen (title) + 1; |
165 | ADDF (title, EXTRACTOR_METATYPE_TITLE); | 165 | ADDF (title, EXTRACTOR_METATYPE_TITLE); |
166 | } | ||
167 | } | 166 | } |
168 | return 0; | 167 | return 0; |
169 | } | 168 | } |
diff --git a/src/plugins/png_extractor.c b/src/plugins/png_extractor.c index fbf25a0..7e35e8a 100644 --- a/src/plugins/png_extractor.c +++ b/src/plugins/png_extractor.c | |||
@@ -100,6 +100,8 @@ processtEXt (const char *data, | |||
100 | if (off >= length) | 100 | if (off >= length) |
101 | return 0; /* failed to find '\0' */ | 101 | return 0; /* failed to find '\0' */ |
102 | keyword = EXTRACTOR_common_convert_to_utf8 (&data[off], length - off, "ISO-8859-1"); | 102 | keyword = EXTRACTOR_common_convert_to_utf8 (&data[off], length - off, "ISO-8859-1"); |
103 | if (keyword == NULL) | ||
104 | return 0; | ||
103 | i = 0; | 105 | i = 0; |
104 | ret = 0; | 106 | ret = 0; |
105 | while (tagmap[i].name != NULL) | 107 | while (tagmap[i].name != NULL) |
@@ -249,8 +251,8 @@ processzTXt (const char *data, | |||
249 | int i; | 251 | int i; |
250 | char *buf; | 252 | char *buf; |
251 | uLongf bufLen; | 253 | uLongf bufLen; |
252 | int ret; | ||
253 | int zret; | 254 | int zret; |
255 | int ret; | ||
254 | 256 | ||
255 | data += 4; | 257 | data += 4; |
256 | off = stnlen (data, length) + 1; | 258 | off = stnlen (data, length) + 1; |
@@ -259,7 +261,7 @@ processzTXt (const char *data, | |||
259 | if (data[off] != 0) | 261 | if (data[off] != 0) |
260 | return 0; /* compression method must be 0 */ | 262 | return 0; /* compression method must be 0 */ |
261 | off++; | 263 | off++; |
262 | 264 | ret = 0; | |
263 | bufLen = 1024 + 2 * (length - off); | 265 | bufLen = 1024 + 2 * (length - off); |
264 | while (1) | 266 | while (1) |
265 | { | 267 | { |