Fix incorrect length argument for strncpy and strncat by replacing them with
strlcpy and strlcat
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/serio/i8042-x86ia64io.h | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 60931ac..5ece9f5 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -370,10 +370,10 @@ static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *
if (pnp_irq_valid(dev,0))
i8042_pnp_kbd_irq = pnp_irq(dev, 0);
- strncpy(i8042_pnp_kbd_name, did->id, sizeof(i8042_pnp_kbd_name));
+ strlcpy(i8042_pnp_kbd_name, did->id, sizeof(i8042_pnp_kbd_name));
if (strlen(pnp_dev_name(dev))) {
- strncat(i8042_pnp_kbd_name, ":", sizeof(i8042_pnp_kbd_name));
- strncat(i8042_pnp_kbd_name, pnp_dev_name(dev), sizeof(i8042_pnp_kbd_name));
+ strlcat(i8042_pnp_kbd_name, ":", sizeof(i8042_pnp_kbd_name));
+ strlcat(i8042_pnp_kbd_name, pnp_dev_name(dev), sizeof(i8042_pnp_kbd_name));
}
i8042_pnp_kbd_devices++;
@@ -391,10 +391,10 @@ static int i8042_pnp_aux_probe(struct pnp_dev *dev, const struct pnp_device_id *
if (pnp_irq_valid(dev, 0))
i8042_pnp_aux_irq = pnp_irq(dev, 0);
- strncpy(i8042_pnp_aux_name, did->id, sizeof(i8042_pnp_aux_name));
+ strlcpy(i8042_pnp_aux_name, did->id, sizeof(i8042_pnp_aux_name));
if (strlen(pnp_dev_name(dev))) {
- strncat(i8042_pnp_aux_name, ":", sizeof(i8042_pnp_aux_name));
- strncat(i8042_pnp_aux_name, pnp_dev_name(dev), sizeof(i8042_pnp_aux_name));
+ strlcat(i8042_pnp_aux_name, ":", sizeof(i8042_pnp_aux_name));
+ strlcat(i8042_pnp_aux_name, pnp_dev_name(dev), sizeof(i8042_pnp_aux_name));
}
i8042_pnp_aux_devices++;
--
1.5.5.rc2.6.gf58d
--
| Ryan Hope | reiser4 for 2.6.27-rc1 |
| hooanon05 | [PATCH 63/67] aufs mount helper |
| Rafael J. Wysocki | 2.6.26-rc9-git12: Reported regressions from 2.6.25 |
| Peter Zijlstra | Re: [ANNOUNCE] mdb: Merkey's Linux Kernel Debugger 2.6.27-rc4 released |
git: | |
| Ken Pratt | pack operation is thrashing my server |
| しらいしななこ | [PATCH] Update Japanese translation |
| Christian Couder | [PATCH] Documentation: help: explain 'man.viewer' multiple values |
| Dennis Schridde | Odd number of elements in anonymous hash |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Chris | avoid logging useless ssh brute force attempts |
| Ray Percival | Re: Real men don't attack straw men |
| Marius ROMAN | 1440x900 resolution problem |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Doug Evans | Re: Stabilizing Linux |
| Stephen Pierce | SLS |
| Mark Evans | Re: Possible bug in TCP/IP stuff of kernel (0.99p5 on up). |
