Skip to content

Input: replace strlcat() with strscpy() in USB input drivers

Shihuang Liu linux-hardening linux-input lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Input: joystick - replace strlcat() with strscpy()drivers/input/joystick/pxrc.c drivers/input/joystick/xpad.c+6 -26 replies
2/5Input: misc - replace strlcat() with strscpy()drivers/input/misc/ati_remote2.c drivers/input/misc/cm109.c drivers/input/misc/ims-pcu.c +3 more+21 -72 replies
3/5Input: mouse - replace strlcat() with strscpy()drivers/input/mouse/appletouch.c drivers/input/mouse/bcm5974.c drivers/input/mouse/synaptics_usb.c+9 -30 replies
4/5Input: tablet - replace strlcat() with strscpy()drivers/input/tablet/acecad.c drivers/input/tablet/aiptek.c drivers/input/tablet/hanwang.c +2 more+17 -61 reply
5/5Input: touchscreen - replace strlcat() with strscpy()drivers/input/touchscreen/sur40.c drivers/input/touchscreen/usbtouchscreen.c+6 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Input: replace strlcat() with strscpy() in USB input drivers

Several USB input drivers build the physical path by appending a constant "/input0" suffix with strlcat() after usb_make_path().

In preparation for removing the deprecated strlcat() API [1], replace it with strnlen() followed by strscpy() into the remainder of the buffer, as commit 34b228b739f5 ("HID: usbhid: replace strlcat with better alternatives") did for the usbhid drivers.

The series is split by input subdirectory:

1/5: joystick drivers (pxrc, xpad)
2/5: misc drivers (ati_remote2, cm109, ims-pcu, keyspan_remote,
powermate, yealink)
3/5: mouse drivers (appletouch, bcm5974, synaptics_usb) 4/5: tablet drivers (acecad, aiptek, hanwang, kbtab,
pegasus_notetaker)
5/5: touchscreen drivers (sur40, usbtouchscreen)

---

Shihuang Liu (5):
Input: joystick - replace strlcat() with strscpy()
Input: misc - replace strlcat() with strscpy()
Input: mouse - replace strlcat() with strscpy()
Input: tablet - replace strlcat() with strscpy()
Input: touchscreen - replace strlcat() with strscpy()

 drivers/input/joystick/pxrc.c              | 4 +++-
 drivers/input/joystick/xpad.c              | 4 +++-
 drivers/input/misc/ati_remote2.c           | 4 +++-
 drivers/input/misc/cm109.c                 | 4 +++-
 drivers/input/misc/ims-pcu.c               | 8 ++++++--
 drivers/input/misc/keyspan_remote.c        | 4 +++-
 drivers/input/misc/powermate.c             | 4 +++-
 drivers/input/misc/yealink.c               | 4 +++-
 drivers/input/mouse/appletouch.c           | 4 +++-
 drivers/input/mouse/bcm5974.c              | 4 +++-
 drivers/input/mouse/synaptics_usb.c        | 4 +++-
 drivers/input/tablet/acecad.c              | 4 +++-
 drivers/input/tablet/aiptek.c              | 7 +++++--
 drivers/input/tablet/hanwang.c             | 4 +++-
 drivers/input/tablet/kbtab.c               | 4 +++-
 drivers/input/tablet/pegasus_notetaker.c   | 4 +++-
 drivers/input/touchscreen/sur40.c          | 4 +++-
 drivers/input/touchscreen/usbtouchscreen.c | 4 +++-
 18 files changed, 59 insertions(+), 20 deletions(-)
Signature · 1 line
2.43.0