提交 760033c4 编写于 作者: C Chen Gang 提交者: Linus Torvalds

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: NChen Gang <gang.chen@asianux.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 519ebea3
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册