diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-07-04 00:04:52 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 01:07:41 +0200 |
commit | 760033c45e8aa13c9e02530da7274edc624c7689 (patch) | |
tree | 1bc2fd61d9af6a4133dde164705d758ffd342a90 /arch/frv/kernel | |
parent | mm: memcontrol: factor out reclaim iterator loading and updating (diff) | |
download | linux-760033c45e8aa13c9e02530da7274edc624c7689.tar.xz linux-760033c45e8aa13c9e02530da7274edc624c7689.zip |
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 <gang.chen@asianux.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/frv/kernel')
-rw-r--r-- | arch/frv/kernel/traps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/frv/kernel/traps.c b/arch/frv/kernel/traps.c index 4bff48c19d29..a6d105d61b26 100644 --- a/arch/frv/kernel/traps.c +++ b/arch/frv/kernel/traps.c @@ -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(); |