diff options
author | 2004-03-31 18:48:15 +0000 | |
---|---|---|
committer | 2004-03-31 18:48:15 +0000 | |
commit | 59af49d198dee08b4ff879c089f763d27397cc2e (patch) | |
tree | 85d5243b583b5bb5cd894a8d8c94dd921747e440 | |
parent | Simplify; jmc@ ok (diff) | |
download | wireguard-openbsd-59af49d198dee08b4ff879c089f763d27397cc2e.tar.xz wireguard-openbsd-59af49d198dee08b4ff879c089f763d27397cc2e.zip |
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 |