Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memcpy issue #41

Open
beranat opened this issue Mar 15, 2018 · 0 comments
Open

memcpy issue #41

beranat opened this issue Mar 15, 2018 · 0 comments

Comments

@beranat
Copy link

beranat commented Mar 15, 2018

addr changed from array to pointer, so get address is not needed

diff --git a/os/linux/sta_ioctl.c b/os/linux/sta_ioctl.c
index 50afb88..12fd2e5 100644
--- a/os/linux/sta_ioctl.c
+++ b/os/linux/sta_ioctl.c
@@ -693,7 +693,7 @@ int rt_ioctl_iwaplist(struct net_device *dev,
                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]));
@beranat beranat changed the title Memory damaging code memcpy issue Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant