diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-12 02:17:16 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-12 02:17:16 +0000 |
commit | 2dc91884652aa586951026dc2d518b9b6957577a (patch) | |
tree | d0a5f975865b932283afcf2b510c405e6227c44e /libavformat/ffmdec.c | |
parent | 6fcce4f995df3c6c44b16a810b772f529e9aa6bf (diff) | |
download | ffmpeg-2dc91884652aa586951026dc2d518b9b6957577a.tar.gz |
return error if read failed
Originally committed as revision 17173 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ffmdec.c')
-rw-r--r-- | libavformat/ffmdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 6f96c719ab..e8e1891b4a 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -30,7 +30,8 @@ int64_t ffm_read_write_index(int fd) uint8_t buf[8]; lseek(fd, 8, SEEK_SET); - read(fd, buf, 8); + if (read(fd, buf, 8) != 8) + return AVERROR(EIO); return AV_RB64(buf); } |