Skip to content
Snippets Groups Projects
user avatar
Len Baker authored
strcpy() performs no bounds checking on the destination buffer. This
could result in linear overflows beyond the end of the buffer, leading
to all kinds of misbehaviors. The safe replacement is strscpy() but in
this case it is better to use the scnprintf to simplify the arithmetic.

This is a previous step in the path to remove the strcpy() function
entirely from the kernel.

Signed-off-by: default avatarLen Baker <len.baker@gmx.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
785077fa
History