Fix EAP-FAST PAC file writer to avoid crash with multiple PACs
One of the pointers to the PAC buffer was not updated after realloc and if the realloc ended up returning new pointer, the *pos pointer was still pointing at the old location (i.e., freed memory at this point).
This commit is contained in:
parent
0f3e4f2a83
commit
c4d7fc90a2
1 changed files with 1 additions and 0 deletions
|
@ -497,6 +497,7 @@ static void eap_fast_write(char **buf, char **pos, size_t *buf_len,
|
|||
*buf = NULL;
|
||||
return;
|
||||
}
|
||||
*pos = nbuf + (*pos - *buf);
|
||||
*buf = nbuf;
|
||||
*buf_len += need;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue