summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorRobert Swiecki <robert@swiecki.net>2018-01-14 16:50:35 +0100
committerRobert Swiecki <robert@swiecki.net>2018-01-14 16:50:35 +0100
commit40332e94346b3ffea0886d5d0716895ee87a8d41 (patch)
treed4d7c5df5192ffcdea718588bf15765f5a313159 /input.c
parent83952242a15d7fad8fe8064d32db5a23ecb853fe (diff)
downloadhonggfuzz-40332e94346b3ffea0886d5d0716895ee87a8d41.tar.gz
dictionary: no need to use dictqCurrent + more logging when parsing the dict
Diffstat (limited to 'input.c')
-rw-r--r--input.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/input.c b/input.c
index b2c439c1..2210c449 100644
--- a/input.c
+++ b/input.c
@@ -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);