mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 13:38:47 +00:00
Check fread return value in LoadSoundFile(readclause.c) [clang scan-build]
This commit is contained in:
@@ -850,7 +850,12 @@ static int LoadSoundFile(const char *fname, int index)
|
||||
fclose(f);
|
||||
return 4;
|
||||
}
|
||||
length = fread(p, 1, length, f);
|
||||
if (fread(p, 1, length, f) != length) {
|
||||
fclose(f);
|
||||
remove(fname_temp);
|
||||
free(p);
|
||||
return 5;
|
||||
}
|
||||
fclose(f);
|
||||
remove(fname_temp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user