Messages in this thread Patch in this message | | | Date | Sun, 24 Oct 1999 19:19:23 +0200 (CEST) | From | Wolfram Pienkoss <> | Subject | [PATCH] 2.3.23 bug-fix for vfat |
| |
Hi,
The patch below fixes a possible reading beyond the end of string in the function xlate_to_uni, if the mountoption 'uni_xlate' is set.
The bug causes the error message 'invalid argument' in sporadic distances.
Wolfram
diff -urdN linux-2.3.23.orig/fs/vfat/namei.c linux-2.3.23.vfat/fs/vfat/namei.c --- linux-2.3.23.orig/fs/vfat/namei.c Mon Aug 9 20:43:49 1999 +++ linux-2.3.23.vfat/fs/vfat/namei.c Sun Oct 24 18:47:05 1999 @@ -661,7 +661,7 @@ op = outname; if (nls) { for (i = 0, ip = name, op = outname, *outlen = 0; - i < len && *outlen <= 260; i++, *outlen += 1) + i < len && *outlen <= 260; *outlen += 1) { if (escape && (*ip == ':')) { if (i > len - 4) return -EINVAL; @@ -673,10 +673,12 @@ *op++ = (c1 << 4) + (c2 >> 2); *op++ = ((c2 & 0x3) << 6) + c3; ip += 4; + i += 4; } else { *op++ = nls->charset2uni[*ip].uni1; *op++ = nls->charset2uni[*ip].uni2; ip++; + i++; } } } else {
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |