diff options
| author | Yoshihiro Shimoda <[email protected]> | 2019-07-31 19:15:43 +0900 |
|---|---|---|
| committer | Felipe Balbi <[email protected]> | 2019-08-12 08:55:24 +0300 |
| commit | 5dac665cf403967bb79a7aeb8c182a621fe617ff (patch) | |
| tree | ebcd7dd86e25a663ac9264e4aa1edd0135b372a4 /lib/test_fortify/write_overflow-strcpy.c | |
| parent | d45331b00ddb179e291766617259261c112db872 (diff) | |
usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role"
Since the role_store() uses strncmp(), it's possible to refer
out-of-memory if the sysfs data size is smaller than strlen("host").
This patch fixes it by using sysfs_streq() instead of strncmp().
Fixes: cc995c9ec118 ("usb: gadget: udc: renesas_usb3: add support for usb role swap")
Cc: <[email protected]> # v4.12+
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Yoshihiro Shimoda <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strcpy.c')
0 files changed, 0 insertions, 0 deletions