aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-15 21:25:31 +0200
committerChristian Grothoff <christian@grothoff.org>2017-10-15 21:25:31 +0200
commite3e54b4f62f02b7c787ecaf064dba17ee1f1a9ca (patch)
tree559d6e4e38cc579f0ad63d5e1a3651eb26de7169
parent3d4576cff6f27cb7e14b8481b95dafa966d279b0 (diff)
downloadlibextractor-e3e54b4f62f02b7c787ecaf064dba17ee1f1a9ca.tar.gz
libextractor-e3e54b4f62f02b7c787ecaf064dba17ee1f1a9ca.zip
avoid NPE on empty value in grep-friendly printing
-rw-r--r--src/main/extract.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/extract.c b/src/main/extract.c
index 4274355..2492fa9 100644
--- a/src/main/extract.c
+++ b/src/main/extract.c
@@ -383,6 +383,8 @@ print_selected_keywords_grep_friendly (void *cls,
383 case EXTRACTOR_METAFORMAT_UNKNOWN: 383 case EXTRACTOR_METAFORMAT_UNKNOWN:
384 break; 384 break;
385 case EXTRACTOR_METAFORMAT_UTF8: 385 case EXTRACTOR_METAFORMAT_UTF8:
386 if (0 == data_len)
387 return 0;
386 if (verbose > 1) 388 if (verbose > 1)
387 FPRINTF (stdout, 389 FPRINTF (stdout,
388 "%s: ", 390 "%s: ",