T.83.6: Incorrect memory allocation in configuration parser.

This commit is contained in:
Felicity Tarnell 2014-03-07 16:11:23 +00:00
parent af2b5dc45c
commit b174130c91
3 changed files with 11 additions and 11 deletions

2
tts.c
View file

@ -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++;