mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
d551afc258
Use scnprintf() for printing the message about dropped messages on
a console. It returns the really written length of the message.
It prevents potential buffer overflow when the returned length is
later used to copy the buffer content.
Note that the previous code was safe because the scratch buffer was
big enough and the message always fit in. But scnprintf() makes
it more safe, definitely.
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1530570 ("Memory - corruptions")
Fixes:
|
||
---|---|---|
.. | ||
braille.c | ||
braille.h | ||
console_cmdline.h | ||
index.c | ||
internal.h | ||
Makefile | ||
printk_ringbuffer.c | ||
printk_ringbuffer.h | ||
printk_safe.c | ||
printk.c | ||
sysctl.c |