提交 4c332c32 编写于 作者: K Kees Cook 提交者: Tony Luck

[IA64] Keep format strings from leaking into printk

The buffer being sent to printk has already had format strings
resolved. The string should not be reinterpreted again to avoid any
unintended format strings from leaking into printk.
Signed-off-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 d2111423
...@@ -217,7 +217,7 @@ void ia64_mca_printk(const char *fmt, ...) ...@@ -217,7 +217,7 @@ void ia64_mca_printk(const char *fmt, ...)
/* Copy the output into mlogbuf */ /* Copy the output into mlogbuf */
if (oops_in_progress) { if (oops_in_progress) {
/* mlogbuf was abandoned, use printk directly instead. */ /* mlogbuf was abandoned, use printk directly instead. */
printk(temp_buf); printk("%s", temp_buf);
} else { } else {
spin_lock(&mlogbuf_wlock); spin_lock(&mlogbuf_wlock);
for (p = temp_buf; *p; p++) { for (p = temp_buf; *p; p++) {
...@@ -268,7 +268,7 @@ void ia64_mlogbuf_dump(void) ...@@ -268,7 +268,7 @@ void ia64_mlogbuf_dump(void)
} }
*p = '\0'; *p = '\0';
if (temp_buf[0]) if (temp_buf[0])
printk(temp_buf); printk("%s", temp_buf);
mlogbuf_start = index; mlogbuf_start = index;
mlogbuf_timestamp = 0; mlogbuf_timestamp = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册