Check the return value of fseek.
Reported by: Coverity CID: 1388267 Sponsored by: iXsystems, Inc.
This commit is contained in:
parent
459a61fd2d
commit
695fed77a8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332437
@ -80,7 +80,9 @@ static int
|
|||||||
read_sector(FILE *iso, daddr_t sector, char *buffer)
|
read_sector(FILE *iso, daddr_t sector, char *buffer)
|
||||||
{
|
{
|
||||||
|
|
||||||
fseek(iso, sector * ISO_DEFAULT_BLOCK_SIZE, SEEK_SET);
|
if (fseek(iso, sector * ISO_DEFAULT_BLOCK_SIZE, SEEK_SET) != 0) {
|
||||||
|
return (errno);
|
||||||
|
}
|
||||||
if (fread(buffer, ISO_DEFAULT_BLOCK_SIZE, 1, iso) != 1) {
|
if (fread(buffer, ISO_DEFAULT_BLOCK_SIZE, 1, iso) != 1) {
|
||||||
return (errno);
|
return (errno);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user