diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-05-16 21:24:00 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2019-07-06 14:07:41 +0300 |
commit | dcae9052ebb0c5b2614de620323d615fcbfda7f8 (patch) | |
tree | 88c970ef166cff7817c2b060dc6bdfc711426532 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 44d34af2e4cfd0c5357182f8b43f3e0a1fe30a2e (diff) | |
download | linux-dcae9052ebb0c5b2614de620323d615fcbfda7f8.tar.xz |
Bluetooth: hidp: NUL terminate a string in the compat ioctl
This change is similar to commit a1616a5ac99e ("Bluetooth: hidp: fix
buffer overflow") but for the compat ioctl. We take a string from the
user and forgot to ensure that it's NUL terminated.
I have also changed the strncpy() in to strscpy() in hidp_setup_hid().
The difference is the strncpy() doesn't necessarily NUL terminate the
destination string. Either change would fix the problem but it's nice
to take a belt and suspenders approach and do both.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions