diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-03-14 14:26:46 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-03-14 14:26:46 +0000 |
commit | eb9a986f5ef1ca5b3e8663b9705ae725d608064a (patch) | |
tree | ba8caa3a45367ad5f019e28035624d0533ae6f03 | |
parent | Update ChangeLog (diff) | |
download | w3m-eb9a986f5ef1ca5b3e8663b9705ae725d608064a.tar.gz w3m-eb9a986f5ef1ca5b3e8663b9705ae725d608064a.zip |
Call wtf_init() in fuzzing
-rw-r--r-- | fuzz/fuzz-conv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fuzz/fuzz-conv.c b/fuzz/fuzz-conv.c index 3e85f86..0602134 100644 --- a/fuzz/fuzz-conv.c +++ b/fuzz/fuzz-conv.c @@ -3,6 +3,7 @@ #include <stdlib.h> #include <gc.h> #include "wc.h" +#include "wtf.h" char *get_null_terminated(const uint8_t *data, size_t size) { char *new_str = (char *)malloc(size+1); @@ -29,6 +30,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){ #else GC_oom_fn = die_oom; #endif +#ifdef USE_M17N +#ifdef USE_UNICODE + wtf_init(WC_CES_UTF_8, WC_CES_UTF_8); +#else + wtf_init(WC_CES_EUC_JP, WC_CES_EUC_JP); +#endif +#endif init_done = 1; } |