Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5dc5503f authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 746ae30f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);