projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
519ebea
)
arch/frv/kernel/traps.c: using vsnprintf() instead of vsprintf()
author
Chen Gang
<gang.chen@asianux.com>
Wed, 3 Jul 2013 22:04:52 +0000
(15:04 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:41 +0000
(16:07 -0700)
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>
arch/frv/kernel/traps.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/frv/kernel/traps.c
b/arch/frv/kernel/traps.c
index 4bff48c19d29733e90d75cbad1d631f3cadc3aaf..a6d105d61b268d09dea36de65e367abde64994c8 100644
(file)
--- 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);
- vs
printf(buffer
, str, va);
+ vs
nprintf(buffer, sizeof(buffer)
, str, va);
va_end(va);
console_verbose();