OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fd6510
)
ffm_write_write_index: check lseek() return code
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 17 Oct 2012 18:23:16 +0000
(20:23 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 17 Oct 2012 18:23:16 +0000
(20:23 +0200)
Fixes CID732185
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffserver.c
patch
|
blob
|
history
diff --git
a/ffserver.c
b/ffserver.c
index
f98ee82
..
bab40a3
100644
(file)
--- a/
ffserver.c
+++ b/
ffserver.c
@@
-346,7
+346,8
@@
static int ffm_write_write_index(int fd, int64_t pos)
for(i=0;i<8;i++)
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)
return AVERROR(EIO);
return 8;