]> git.sesse.net Git - vlc/commitdiff
file: pass error from lseek()
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 18 Aug 2014 17:58:57 +0000 (20:58 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 18 Aug 2014 17:58:57 +0000 (20:58 +0300)
modules/access/file.c

index 6a1bde1d8ca191e072f0ad06697c77ef8def0c12..1b5d435078a0e3f052ba1c4fe89ede54fe7619ad 100644 (file)
@@ -328,7 +328,8 @@ static int FileSeek (access_t *p_access, uint64_t i_pos)
     p_access->info.i_pos = i_pos;
     p_access->info.b_eof = false;
 
-    lseek (p_access->p_sys->fd, i_pos, SEEK_SET);
+    if (lseek (p_access->p_sys->fd, i_pos, SEEK_SET) == (off_t)-1)
+        return VLC_EGENERIC;
     return VLC_SUCCESS;
 }