Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[sfrench/cifs-2.6.git] / Documentation / laptops / freefall.c
index aab2ff09e86842aec48ba0d61b7972f4cae1f4c3..d4173186555c5f6ea29996df1acd71c9c1b364b7 100644 (file)
@@ -34,6 +34,7 @@ static int set_unload_heads_path(char *device)
        if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0)
                return -EINVAL;
        strncpy(devname, device + 5, sizeof(devname) - 1);
+       devname[sizeof(devname) - 1] = '\0';
        strncpy(device_path, device, sizeof(device_path) - 1);
 
        snprintf(unload_heads_path, sizeof(unload_heads_path) - 1,