提交 5dc5503f 编写于 作者: D Dan Carpenter 提交者: David S. Miller

isdn: avoid copying too long drvid

"cfg->drvid" comes from the user so there is a possibility they
didn't NUL terminate it properly.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 746ae30f
......@@ -2756,6 +2756,9 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg)
char *c,
*e;
if (strnlen(cfg->drvid, sizeof(cfg->drvid)) ==
sizeof(cfg->drvid))
return -EINVAL;
drvidx = -1;
chidx = -1;
strcpy(drvid, cfg->drvid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册