[syslinux:pathbased] fat: fix longname matching
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Thu Mar 4 16:39:14 PST 2010
Commit-ID: 11aab30bfa37846d44f501ab94a86cf9a7387d61
Gitweb: http://syslinux.zytor.com/commit/11aab30bfa37846d44f501ab94a86cf9a7387d61
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Thu, 4 Mar 2010 16:36:32 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Thu, 4 Mar 2010 16:36:32 -0800
fat: fix longname matching
Fix longname matching, which was broken due to missing counter
decrement.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
core/fs/fat/fat.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/fs/fat/fat.c b/core/fs/fat/fat.c
index 9f221e9..fbd524d 100644
--- a/core/fs/fat/fat.c
+++ b/core/fs/fat/fat.c
@@ -323,7 +323,7 @@ static bool vfat_match_longname(const char *str, const uint16_t *match,
unsigned char c;
uint16_t cp;
- while (len) {
+ while (len--) {
cp = *match++;
c = *str++;
if (cp != codepage.uni[0][c] && cp != codepage.uni[1][c])
@@ -336,7 +336,7 @@ static bool vfat_match_longname(const char *str, const uint16_t *match,
return false;
/* Any padding entries must be FFFF */
- while (len)
+ while (len--)
if (*match++ != 0xffff)
return false;
More information about the Syslinux-commits
mailing list