[vlc-commits] input/access: fix out-of-bound read on hidden file

Filip Roséen git at videolan.org
Tue Jun 21 15:36:43 CEST 2016


vlc | branch: master | Filip Roséen <filip at videolabs.io> | Tue Jun 21 15:03:32 2016 +0200| [933b6875729230f118b110929a2a8b94a61e634a] | committer: Thomas Guillem

input/access: fix out-of-bound read on hidden file

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

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

diff --git a/src/input/access.c b/src/input/access.c
index 79417ac..e7df2ee 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -547,7 +547,7 @@ static char *fsdir_name_from_filename(const char *psz_filename)
 
     /* remove extension */
     char *psz_ptr = strrchr(psz_name, '.');
-    if (psz_ptr)
+    if (psz_ptr && psz_ptr != psz_name)
         *psz_ptr = '\0';
 
     /* remove trailing white spaces */



More information about the vlc-commits mailing list