提交 69cbc046 编写于 作者: C Chen Gang 提交者: Tony Luck

[IA64] hpsim: Fix check for overlong simscsi prefix.

When "strlen(s) > MAX_ROOT_LEN", it has already said to use the default
value, but in fact, it still use the input value.

If happens, next sprintf() for 'fname' in simscsi_queuecommand_lck()
may be memory overflow.
Signed-off-by: NChen Gang <gang.chen@asianux.com>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 d5e660ba
......@@ -88,8 +88,8 @@ simscsi_setup (char *s)
if (strlen(s) > MAX_ROOT_LEN) {
printk(KERN_ERR "simscsi_setup: prefix too long---using default %s\n",
simscsi_root);
}
simscsi_root = s;
} else
simscsi_root = s;
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册