diff options
Diffstat (limited to 'Documentation/laptops')
-rw-r--r-- | Documentation/laptops/hpfall.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/laptops/hpfall.c b/Documentation/laptops/hpfall.c index b85dbbac0499..67084321dab4 100644 --- a/Documentation/laptops/hpfall.c +++ b/Documentation/laptops/hpfall.c @@ -28,6 +28,7 @@ int set_unload_heads_path(char *device) if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0) return -EINVAL; strncpy(devname, device + 5, sizeof(devname)); + devname[sizeof(devname) - 1] = '\0'; snprintf(unload_heads_path, sizeof(unload_heads_path) - 1, "/sys/block/%s/device/unload_heads", devname); |