diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/nsfe_extractor.c | 9 | ||||
-rw-r--r-- | src/plugins/png_extractor.c | 6 |
2 files changed, 8 insertions, 7 deletions
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 | { |