[fuzzer] Fix hb-set-fuzzer minor overflow issue

Size shouldn't be smaller than the struct not its pointer size.

Fixes https://crbug.com/oss-fuzz/20655
This commit is contained in:
Ebrahim Byagowi 2020-02-12 15:41:22 +03:30
parent 7b42403c1c
commit 97229244eb
2 changed files with 5 additions and 4 deletions

View File

@ -33,7 +33,7 @@ static hb_set_t* create_set (const uint32_t* value_array, int count)
extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
{
if (size < sizeof(instructions_t*))
if (size < sizeof (instructions_t))
return 0;
const instructions_t* instructions = reinterpret_cast<const instructions_t*> (data);