diff options
author | Christoph Hellwig <hch@lst.de> | 2005-05-14 17:29:58 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-15 17:53:25 -0400 |
commit | d0e3e87ff4516d1b9d7bc6734a99168838f79635 (patch) | |
tree | 062f69e28e027411f9db68b7a637ddf84104a6a8 /drivers/net/wireless/orinoco.c | |
parent | b24d4582fd93f3654d0a0a89f85e95140efc7fd4 (diff) | |
download | blackbird-op-linux-d0e3e87ff4516d1b9d7bc6734a99168838f79635.tar.gz blackbird-op-linux-d0e3e87ff4516d1b9d7bc6734a99168838f79635.zip |
[PATCH] orinoco: fix setting of 32 character ESSIDs
Patch from Thomas Schulz
Index: linux-2.6/drivers/net/wireless/orinoco.c
===================================================================
Diffstat (limited to 'drivers/net/wireless/orinoco.c')
-rw-r--r-- | drivers/net/wireless/orinoco.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index d910b89e6482..76875dac9d69 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c @@ -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) |