driver_wext.c memcpy problem

Dmitry Shmidt dimitrysh
Thu Apr 30 16:42:28 PDT 2009


In driver_wext.c in function there is memcpy that has overlapping areas :
struct wpa_scan_results * wpa_driver_wext_get_scan_results(void *priv)
if (wext_19_iw_point(drv, iwe->cmd)) {
            /* WE-19 removed the pointer from struct iw_point */
            char *dpos = (char *) &;
            int dlen = dpos - (char *) &iwe_buf;
            os_memcpy(dpos, pos + IW_EV_LCP_LEN,   <<<<<<<<<<
                  sizeof(struct iw_event) - dlen);
        } else {
            os_memcpy(&iwe_buf, pos, sizeof(struct iw_event));
            custom += IW_EV_POINT_OFF;

It didn't work for me so I needed to exchange it with memmove() call.
I am just curious how it worked for other people ? Is it possible that most
memcpy() lib functions know how to handle overlapping areas ?
Anyway it is not a mandatory memcpy() functionality.


-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Hostap mailing list