ffm_write_write_index: check lseek() return code
Fixes CID732185 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7fd65104f4
commit
378a5b9c5f
1 changed files with 2 additions and 1 deletions
|
@ -346,7 +346,8 @@ static int ffm_write_write_index(int fd, int64_t pos)
|
||||||
|
|
||||||
for(i=0;i<8;i++)
|
for(i=0;i<8;i++)
|
||||||
buf[i] = (pos >> (56 - i * 8)) & 0xff;
|
buf[i] = (pos >> (56 - i * 8)) & 0xff;
|
||||||
lseek(fd, 8, SEEK_SET);
|
if (lseek(fd, 8, SEEK_SET) < 0)
|
||||||
|
return AVERROR(EIO);
|
||||||
if (write(fd, buf, 8) != 8)
|
if (write(fd, buf, 8) != 8)
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
return 8;
|
return 8;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue