Commit 74328596 authored by William Stinson's avatar William Stinson Committed by Jeff Garzik

[janitor] update the ray_cs.c PCMCIA client driver for the Raylink wireless LAN card

1) checks the result of copy_to_user and 
2) returns -EFAULT in case not all data was copied. 

I don't have this hardware so compilation checked only.
parent 04edce66
......@@ -1316,9 +1316,12 @@ static int ray_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
err = -E2BIG;
break;
}
copy_from_user(card_essid,
if (copy_from_user(card_essid,
wrq->u.data.pointer,
wrq->u.data.length);
wrq->u.data.length)) {
err = -EFAULT;
break;
}
card_essid[IW_ESSID_MAX_SIZE] = '\0';
/* Set the ESSID in the card */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment