mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Add a missing check for fread
Approved by: cperciva MFC after: 3 days
This commit is contained in:
parent
03ad1b0ba0
commit
cb711f6d5d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243074
@ -325,6 +325,8 @@ main(int argc, char *argv[])
|
|||||||
rewind (fp);
|
rewind (fp);
|
||||||
img = calloc(fsize, 1);
|
img = calloc(fsize, 1);
|
||||||
n = fread (img, fsize, 1, fp);
|
n = fread (img, fsize, 1, fp);
|
||||||
|
if (n == 0)
|
||||||
|
err(1, "reading .SYS file '%s' failed", sysfile);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user