forked from Minki/linux
prism54: potential memory corruption in prism54_get_essid()
"dwrq->length" is the capped version of "essid->length". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
de3584bd62
commit
40f9cd299a
@ -778,7 +778,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
|
||||
dwrq->flags = 0;
|
||||
dwrq->length = 0;
|
||||
}
|
||||
essid->octets[essid->length] = '\0';
|
||||
essid->octets[dwrq->length] = '\0';
|
||||
memcpy(extra, essid->octets, dwrq->length);
|
||||
kfree(essid);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user