mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-05 06:45:39 +00:00
Fix truncated fgetc return value in main(espeak-ng.c). [Coverity]
This commit is contained in:
+4
-2
@@ -672,8 +672,10 @@ int main(int argc, char **argv)
|
||||
} else {
|
||||
// bulk input on stdin
|
||||
ix = 0;
|
||||
while (!feof(stdin)) {
|
||||
p_text[ix++] = fgetc(stdin);
|
||||
while (true) {
|
||||
if ((c = fgetc(stdin)) == EOF)
|
||||
break;
|
||||
p_text[ix++] = (char)c;
|
||||
if (ix >= (max-1)) {
|
||||
max += 1000;
|
||||
char *new_text = (char *)realloc(p_text, max);
|
||||
|
||||
Reference in New Issue
Block a user