Check the return value of fseek.
Reported by: Coverity CID: 1388267 Sponsored by: iXsystems, Inc.
This commit is contained in:
parent
19e7651c74
commit
1ebccb19a5
@ -80,7 +80,9 @@ static int
|
||||
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) {
|
||||
return (errno);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user