]> git.hungrycats.org Git - linux/commitdiff
Revert toshiba_acpi strlcpy'fication as per John Belmonte.
authorLinus Torvalds <torvalds@home.osdl.org>
Fri, 25 Jul 2003 11:15:10 +0000 (04:15 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 25 Jul 2003 11:15:10 +0000 (04:15 -0700)
drivers/acpi/toshiba_acpi.c

index 20acd4275cf3479a63a55fcf2dd049943c70fba1..0cb16126e317b74309ca85a7ac0a1cda7f2a0dc5 100644 (file)
@@ -108,7 +108,8 @@ snscanf(const char* str, int n, const char* format, ...)
        int result;
        char* str2 = kmalloc(n + 1, GFP_KERNEL);
        if (str2 == 0) return 0;
-       strlcpy(str2, str, n);
+       strncpy(str2, str, n);
+       str2[n] = 0;
        va_start(args, format);
        result = vsscanf(str2, format, args);
        va_end(args);