mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 20:10:09 +01:00
ffm_read_write_index: check lseek return code
Fixes CID732184 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -333,7 +333,8 @@ static int64_t ffm_read_write_index(int fd)
|
|||||||
{
|
{
|
||||||
uint8_t buf[8];
|
uint8_t buf[8];
|
||||||
|
|
||||||
lseek(fd, 8, SEEK_SET);
|
if (lseek(fd, 8, SEEK_SET) < 0)
|
||||||
|
return AVERROR(EIO);
|
||||||
if (read(fd, buf, 8) != 8)
|
if (read(fd, buf, 8) != 8)
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
return AV_RB64(buf);
|
return AV_RB64(buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user