Hi,
sorry for the delay.
On Fri, 01 Sep 2006 11:37:57 +0800, Hong Liu wrote:
> @@ -2925,7 +2932,8 @@ static int ieee80211_ioctl_giwencode(str
> return 0;
> }
>
> - erq->length = 0;
> + erq->length = min((int)erq->length, sdata->keys[idx]->keylen);
> + memcpy(key, sdata->keys[idx]->key, erq->length);
> erq->flags |= IW_ENCODE_ENABLED;
>
> return 0;
This is still not correct, erq->length should be set to the actual key
length to allow WE to return -E2BIG in case of too small buffer.
memcpy(key, sdata->keys[idx]->key,
min((int)erq->length, sdata->keys[idx]->keylen));
erq->length = sdata->keys[idx]->keylen;
Jiri
--
Jiri Benc
SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html