提交 ecbf61e7 编写于 作者: A Alan Cox 提交者: Russell King

[ARM] cumana: Fix a long standing bogon

Should be using strncmp as the data from user space may be unterminated

(Bug #8004)

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 dc85ce15
......@@ -318,7 +318,7 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
{
int ret = length;
if (length >= 11 && strcmp(buffer, "CUMANASCSI2") == 0) {
if (length >= 11 && strncmp(buffer, "CUMANASCSI2", 11) == 0) {
buffer += 11;
length -= 11;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册