Browse Source

Check fread return value in LoadSoundFile(readclause.c) [clang scan-build]

master
Reece H. Dunn 9 years ago
parent
commit
5bbab7e0d3
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      src/libespeak-ng/readclause.c

+ 6
- 1
src/libespeak-ng/readclause.c View File

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


Loading…
Cancel
Save