From: RĂ©mi Denis-Courmont Date: Mon, 18 Aug 2014 17:58:57 +0000 (+0300) Subject: file: pass error from lseek() X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b07af9f473820bcd2b5e2a7849998c430a783fa8;p=vlc file: pass error from lseek() --- diff --git a/modules/access/file.c b/modules/access/file.c index 6a1bde1d8c..1b5d435078 100644 --- a/modules/access/file.c +++ b/modules/access/file.c @@ -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; }