Commit b1fa0664 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

file: file size field is only valid for regular files

parent 0dd144fc
...@@ -346,7 +346,7 @@ static int FileControl( access_t *p_access, int i_query, va_list args ) ...@@ -346,7 +346,7 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
{ {
struct stat st; struct stat st;
if (fstat (p_sys->fd, &st)) if (fstat (p_sys->fd, &st) || !S_ISREG(st.st_mode))
return VLC_EGENERIC; return VLC_EGENERIC;
*va_arg( args, uint64_t * ) = st.st_size; *va_arg( args, uint64_t * ) = st.st_size;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment