From 8e4b4a1d677db17cc55f09a63a445c87fb198386 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 21 Oct 2016 13:37:07 -0700 Subject: [PATCH] kernel - Fix directory scanning bug in msdosfs * Fix a directory scanning bug in msdosfs where an incorrect d_namlen was being returned. Reported-by: htse, t_dfbsd, tuxillo --- sys/vfs/msdosfs/msdosfs_conv.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/vfs/msdosfs/msdosfs_conv.c b/sys/vfs/msdosfs/msdosfs_conv.c index e355840d8a..92696189c7 100644 --- a/sys/vfs/msdosfs/msdosfs_conv.c +++ b/sys/vfs/msdosfs/msdosfs_conv.c @@ -506,7 +506,7 @@ int dos2unixfn(u_char dn[11], u_char *un, int lower, struct msdosfsmount *pmp) { size_t i; - int thislong = 1; + int thislong = 0; u_char c; /* @@ -551,11 +551,7 @@ dos2unixfn(u_char dn[11], u_char *un, int lower, struct msdosfsmount *pmp) } } *un++ = 0; -/* - for(i = 0; un[i] != 0; i++) - kprintf("0x%x", un[i]); - kprintf(" ->%s\n", dn); -*/ + return (thislong); } -- 2.11.4.GIT