aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/stackdepot.py
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2024-04-09 19:31:53 -0700
committerKees Cook <keescook@chromium.org>2024-04-25 10:41:47 -0700
commitd4309246cf6beb1c73b97b4d3bf976969793eb05 (patch)
treec101724b2419198f3858cd51f0fac43566a9b2be /scripts/gdb/linux/stackdepot.py
parent5bb288c4abc2e67d4ea94ba6bc80bb0ab18b123e (diff)
scsi: mpi3mr: Avoid possible run-time warning with long manufacturer strings
The prior use of strscpy() here expected the manufacture_reply strings to be NUL-terminated, but it is possible they are not, as the code pattern here shows, e.g., edev->vendor_id being exactly 1 character larger than manufacture_reply->vendor_id, and the strscpy() was copying only up to the size of the source character array. Replace this with memtostr(), which is the unambiguous way to convert a maybe not-NUL-terminated character array into a NUL-terminated string. Fixes: 2bd37e284914 ("scsi: mpi3mr: Add framework to issue MPT transport cmds") Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20240410023155.2100422-4-keescook@chromium.org Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'scripts/gdb/linux/stackdepot.py')
0 files changed, 0 insertions, 0 deletions