Skip to content

Commit

Permalink
prism54: potential memory corruption in prism54_get_essid()
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Nov 21, 2011
1 parent de3584b commit 40f9cd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/prism54/isl_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 40f9cd2

Please sign in to comment.