diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-03-31 18:48:16 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-03-31 18:48:16 +0000 |
commit | 467d5fce5c192326332ef5b64abb25f42cc89af1 (patch) | |
tree | 75f88750f36eedda0ba14050137ff60a68eedbef | |
parent | 55a37907c27b261971808311001d4b45317209d7 (diff) |
Fix false positives when comparing long file names that have the
same first 13 (or some multiple thereof) characters.
Fix was verified by reporter (Kong Long); from NetBSD
-rw-r--r-- | sys/msdosfs/msdosfs_conv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c index 5883eeb58c5..dda90835f00 100644 --- a/sys/msdosfs/msdosfs_conv.c +++ b/sys/msdosfs/msdosfs_conv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_conv.c,v 1.10 2003/07/29 19:26:38 mickey Exp $ */ +/* $OpenBSD: msdosfs_conv.c,v 1.11 2004/03/31 18:48:15 millert Exp $ */ /* $NetBSD: msdosfs_conv.c,v 1.24 1997/10/17 11:23:54 ws Exp $ */ /*- @@ -654,6 +654,9 @@ winChkName(un, unlen, wep, chksum) if ((unlen -= i) <= 0) return -1; un += i; + + if ((wep->weCnt&WIN_LAST) && unlen > WIN_CHARS) + return -1; /* * Compare the name parts |