mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
arch/frv/kernel/traps.c: using vsnprintf() instead of vsprintf()
Since die_if_kernel() is an extern common used function, better always check the buffer length to avoid memory overflow by a long 'str'. Signed-off-by: Chen Gang <[email protected]> Cc: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
519ebea3bf
commit
760033c45e
1 changed files with 1 additions and 1 deletions
|
|
@ -523,7 +523,7 @@ void die_if_kernel(const char *str, ...)
|
|||
return;
|
||||
|
||||
va_start(va, str);
|
||||
vsprintf(buffer, str, va);
|
||||
vsnprintf(buffer, sizeof(buffer), str, va);
|
||||
va_end(va);
|
||||
|
||||
console_verbose();
|
||||
|
|
|
|||
Loading…
Reference in a new issue