Fix libpsl_load_dafsa_fuzzer for libc6 < 2.22
This commit is contained in:
parent
d686c1fff7
commit
6ca1304bd4
|
@ -59,10 +59,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|||
|
||||
// non-DAFSA load
|
||||
fp = fmemopen(in + 16, size, "r");
|
||||
assert(fp != NULL);
|
||||
if (!fp && size) // libc6 < 2.22 return NULL when size == 0
|
||||
assert(1);
|
||||
|
||||
psl = psl_load_fp(fp);
|
||||
psl_free(psl);
|
||||
if (fp)
|
||||
fclose(fp);
|
||||
|
||||
psl = psl_latest(NULL);
|
||||
|
|
Loading…
Reference in New Issue