projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18b4619
)
init: fix illegal memory access when max message length is reached
author
Yuan-Hsiang Lee
<yhlee@ubnt.com>
Sat, 2 Nov 2013 23:13:16 +0000
(
00:13
+0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 2 Nov 2013 23:13:16 +0000
(
00:13
+0100)
Signed-off-by: Yuan-Hsiang Lee <yhlee@ubnt.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
init/init.c
patch
|
blob
|
history
diff --git
a/init/init.c
b/init/init.c
index cc6a2b5be5e7c35a08d8948fc479c3990c7ce618..2dcdfd471650695f4503aa8333227a98665e6ceb 100644
(file)
--- a/
init/init.c
+++ b/
init/init.c
@@
-222,8
+222,8
@@
static void message(int where, const char *fmt, ...)
msg[0] = '\r';
va_start(arguments, fmt);
l = 1 + vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments);
- if (l > sizeof(msg) -
1
)
- l = sizeof(msg) -
1
;
+ if (l > sizeof(msg) -
2
)
+ l = sizeof(msg) -
2
;
va_end(arguments);
#if ENABLE_FEATURE_INIT_SYSLOG