iovisor/ubpf

Potential dereference of `nullptr` in libfuzzer harness?

hawkinsw opened this issue · 0 comments

if (ubpf_exec_ex(vm.get(), memory.data(), memory.size(), &interpreter_result, ubpf_stack.data(), ubpf_stack.size()) != 0) {

According to CPPReference:

If size() is ​0​, data() may or may not return a null pointer.

That could cause a problem here if there is ever a case where the fuzzer generates an empty input. Is this something that we want to protect?