T.83.6: Incorrect memory allocation in configuration parser.
This commit is contained in:
parent
af2b5dc45c
commit
b174130c91
3 changed files with 11 additions and 11 deletions
2
tts.c
2
tts.c
|
|
@ -2484,7 +2484,7 @@ const WCHAR *p, *q;
|
|||
/* Copy the argument (which is sz bytes long) into the result array */
|
||||
sz = (q - p);
|
||||
*res = realloc(*res, sizeof(WCHAR *) * (ntoks + 1));
|
||||
(*res)[ntoks] = malloc(sizeof(WCHAR) * sz + 1);
|
||||
(*res)[ntoks] = malloc(sizeof(WCHAR) * (sz + 1));
|
||||
MEMCPY((*res)[ntoks], p, sz);
|
||||
(*res)[ntoks][sz] = 0;
|
||||
ntoks++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue