提交 699b052a 编写于 作者: T Tejun Heo 提交者: Bartlomiej Zolnierkiewicz

ide: do_identify() string termination fix

Terminates id->model string before invoking strstr() in do_identify().
Signed-off-by: NTejun Heo <tj@home-tj.org>
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 afda5e4d
......@@ -172,11 +172,12 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
ide_fixstring(id->fw_rev, sizeof(id->fw_rev), bswap);
ide_fixstring(id->serial_no, sizeof(id->serial_no), bswap);
/* we depend on this a lot! */
id->model[sizeof(id->model)-1] = '\0';
if (strstr(id->model, "E X A B Y T E N E S T"))
goto err_misc;
/* we depend on this a lot! */
id->model[sizeof(id->model)-1] = '\0';
printk("%s: %s, ", drive->name, id->model);
drive->present = 1;
drive->dead = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册