Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Commit

Permalink
fix bug in calling memcpy
Browse files Browse the repository at this point in the history
Thanks to CONFIG_FORTIFY_SOURCE, the compiler refused to compile this buggy code.
See https://outflux.net/blog/archives/2017/09/05/security-things-in-linux-v4-13/
for details why this issue hasn't been noticed before kernel 4.13.

Fixes jurobystricky#81.
  • Loading branch information
genodeftest committed Oct 2, 2017
1 parent 8874a06 commit dc7e9b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os/linux/sta_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static int rt_ioctl_iwaplist(struct net_device *dev, struct iw_request_info *inf
set_quality(pAd, &qual[i], pList); /*&pAd->ScanTab.BssEntry[i]); */
}
data->length = i;
memcpy(extra, &addr, i*sizeof(addr[0]));
memcpy(extra, addr, i*sizeof(addr[0]));
data->flags = 1; /* signal quality present (sort of) */
memcpy(extra + i*sizeof(addr[0]), &qual, i*sizeof(qual[i]));

Expand Down

0 comments on commit dc7e9b8

Please sign in to comment.