Fix double free in psl_load_fp(), found by fuzzing
This commit is contained in:
parent
bce2e9acb0
commit
045bf63031
|
@ -1161,6 +1161,8 @@ psl_ctx_t *psl_load_fp(FILE *fp)
|
||||||
/* release unused memory */
|
/* release unused memory */
|
||||||
if ((m = realloc(psl->dafsa, len)))
|
if ((m = realloc(psl->dafsa, len)))
|
||||||
psl->dafsa = m;
|
psl->dafsa = m;
|
||||||
|
else if (!len)
|
||||||
|
psl->dafsa = NULL; // realloc() just free'd psl->dafsa
|
||||||
|
|
||||||
psl->dafsa_size = len;
|
psl->dafsa_size = len;
|
||||||
psl->utf8 = !!GetUtfMode(psl->dafsa, len);
|
psl->utf8 = !!GetUtfMode(psl->dafsa, len);
|
||||||
|
|
Loading…
Reference in New Issue