[vlc-commits] file: file size field is only valid for regular files

Rémi Denis-Courmont git at videolan.org
Mon Aug 31 22:03:28 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 31 23:03:03 2015 +0300| [b1fa066415d757845b5605df2500ed590d53775e] | committer: Rémi Denis-Courmont

file: file size field is only valid for regular files

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1fa066415d757845b5605df2500ed590d53775e
---

 modules/access/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/file.c b/modules/access/file.c
index a9d5977..d8f0419 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -346,7 +346,7 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
         {
             struct stat st;
 
-            if (fstat (p_sys->fd, &st))
+            if (fstat (p_sys->fd, &st) || !S_ISREG(st.st_mode))
                 return VLC_EGENERIC;
             *va_arg( args, uint64_t * ) = st.st_size;
             break;



More information about the vlc-commits mailing list