diff --git a/projects/njs/njs_process_script_fuzzer.c b/projects/njs/njs_process_script_fuzzer.c index b90425d9f..1a1ac0f7d 100644 --- a/projects/njs/njs_process_script_fuzzer.c +++ b/projects/njs/njs_process_script_fuzzer.c @@ -674,8 +674,9 @@ lvlhsh_pool_free(void *pool, void *p, size_t size) int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (size == 0) return 0; - char* input = malloc(size); + char* input = malloc(size + 1); memcpy(input, data, size); + input[size] = 0; nxt_str_t line = {size, input}; njs_vm_t *vm;