diff options
| author | Baris Can Goral <[email protected]> | 2025-05-21 16:10:37 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2025-05-26 20:28:44 +0000 |
| commit | 5bccdc51f90c3194fda4bab92c521c2e2eb4e887 (patch) | |
| tree | 4fb65d9e8ea65e80adfc4100f1a36e429f68f6f4 /net/core/dev_api.c | |
| parent | Merge tag 'nf-next-25-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
| download | kernel-5bccdc51f90c3194fda4bab92c521c2e2eb4e887.tar.gz kernel-5bccdc51f90c3194fda4bab92c521c2e2eb4e887.zip | |
replace strncpy with strscpy_pad
The strncpy() function is actively dangerous to use since it may not
NULL-terminate the destination string, resulting in potential memory
content exposures, unbounded reads, or crashes.
Link: https://github.com/KSPP/linux/issues/90
In addition, strscpy_pad is more appropriate because it also zero-fills
any remaining space in the destination if the source is shorter than
the provided buffer size.
Signed-off-by: Baris Can Goral <[email protected]>
Reviewed-by: Allison Henderson <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/core/dev_api.c')
0 files changed, 0 insertions, 0 deletions
