diff options
Diffstat (limited to 'tools/plistutil.c')
| -rw-r--r-- | tools/plistutil.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/plistutil.c b/tools/plistutil.c index 95ec254..37bb044 100644 --- a/tools/plistutil.c +++ b/tools/plistutil.c | |||
| @@ -337,6 +337,13 @@ int main(int argc, char *argv[]) | |||
| 337 | return 1; | 337 | return 1; |
| 338 | } | 338 | } |
| 339 | read_size = fread(plist_entire, sizeof(char), filestats.st_size, iplist); | 339 | read_size = fread(plist_entire, sizeof(char), filestats.st_size, iplist); |
| 340 | if (read_size != (size_t)filestats.st_size) { | ||
| 341 | fprintf(stderr, "ERROR: Could not read from input file '%s'\n", options->in_file); | ||
| 342 | fclose(iplist); | ||
| 343 | free(plist_entire); | ||
| 344 | free(options); | ||
| 345 | return 1; | ||
| 346 | } | ||
| 340 | plist_entire[read_size] = '\0'; | 347 | plist_entire[read_size] = '\0'; |
| 341 | fclose(iplist); | 348 | fclose(iplist); |
| 342 | } | 349 | } |
