diff options
author | Robert Swiecki <robert@swiecki.net> | 2018-01-14 16:50:35 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2018-01-14 16:50:35 +0100 |
commit | 40332e94346b3ffea0886d5d0716895ee87a8d41 (patch) | |
tree | d4d7c5df5192ffcdea718588bf15765f5a313159 /input.c | |
parent | 83952242a15d7fad8fe8064d32db5a23ecb853fe (diff) | |
download | honggfuzz-40332e94346b3ffea0886d5d0716895ee87a8d41.tar.gz |
dictionary: no need to use dictqCurrent + more logging when parsing the dict
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -135,7 +135,7 @@ bool input_getNext(run_t* run, char* fname, bool rewind) { MX_SCOPED_LOCK(&input_mutex); if (run->global->io.fileCnt == 0U) { - LOG_W("No useful files in the input directory"); + LOG_W("No useful files in the input directory"); return false; } @@ -237,12 +237,14 @@ bool input_parseDictionary(honggfuzz_t* hfuzz) { } char bufn[1025] = {}; char bufv[1025] = {}; - if (sscanf(lineptr, "\"%1024[^\"]", bufv) != 1 && - sscanf(lineptr, "%1024[^=]=\"%1024[^\"]", bufn, bufv) != 2) { + if (sscanf(lineptr, "\"%1024s", bufv) != 1 && + sscanf(lineptr, "%1024[^=]=\"%1024s", bufn, bufv) != 2) { LOG_W("Incorrect dictionary entry: '%s'. Skipping", lineptr); continue; } + LOG_D("Parsing word: '%s'", bufv); + char* s = util_StrDup(bufv); struct strings_t* str = (struct strings_t*)util_Malloc(sizeof(struct strings_t)); str->len = util_decodeCString(s); |