changeset 4459:241532434509 libavformat

return error if read failed
author bcoudurier
date Thu, 12 Feb 2009 02:17:16 +0000
parents f734aba9452e
children 21945a5288cb
files ffmdec.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ffmdec.c	Thu Feb 12 02:15:07 2009 +0000
+++ b/ffmdec.c	Thu Feb 12 02:17:16 2009 +0000
@@ -30,7 +30,8 @@
     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);
 }