Browse Source

Fix a null pointer dereference in create_espeak_pronunciation_list(espeak_command.c). [Coverity]

master
Reece H. Dunn 9 years ago
parent
commit
e74a0e4f53
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/libespeak-ng/espeak_command.c

+ 4
- 0
src/libespeak-ng/espeak_command.c View File

@@ -179,6 +179,10 @@ t_espeak_command *create_espeak_punctuation_list(const wchar_t *punctlist)

size_t len = (wcslen(punctlist) + 1)*sizeof(wchar_t);
wchar_t *a_list = (wchar_t *)malloc(len);
if (a_list == NULL) {
free(a_command);
return NULL;
}
memcpy(a_list, punctlist, len);
a_command->u.my_punctuation_list = a_list;


Loading…
Cancel
Save