Skip to content

Commit

Permalink
[PATCH] orinoco: fix setting of 32 character ESSIDs
Browse files Browse the repository at this point in the history
Patch from Thomas Schulz

Index: linux-2.6/drivers/net/wireless/orinoco.c
===================================================================
  • Loading branch information
Christoph Hellwig authored and Jeff Garzik committed May 15, 2005
1 parent b24d458 commit d0e3e87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/orinoco.c
Original file line number Diff line number Diff line change
Expand Up @@ -2907,13 +2907,14 @@ static int orinoco_ioctl_setessid(struct net_device *dev, struct iw_point *erq)
memset(&essidbuf, 0, sizeof(essidbuf));

if (erq->flags) {
if (erq->length > IW_ESSID_MAX_SIZE)
/* iwconfig includes the NUL in the specified length */
if (erq->length > IW_ESSID_MAX_SIZE+1)
return -E2BIG;

if (copy_from_user(&essidbuf, erq->pointer, erq->length))
return -EFAULT;

essidbuf[erq->length] = '\0';
essidbuf[IW_ESSID_MAX_SIZE] = '\0';
}

if (orinoco_lock(priv, &flags) != 0)
Expand Down

0 comments on commit d0e3e87

Please sign in to comment.