aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-03-26 13:32:02 (GMT)
committerJouni Malinen <j@w1.fi>2009-03-26 13:33:56 (GMT)
commit5cf40d9bfc1b5e4abbf43fc6106b18245a7b5855 (patch)
tree9569bd8af21941868e59eca356b6e3ad20ef8c91
parentd8ddf545561793c714d0b73f050b3c56d0c7ec6c (diff)
downloadhostap-06-5cf40d9bfc1b5e4abbf43fc6106b18245a7b5855.zip
hostap-06-5cf40d9bfc1b5e4abbf43fc6106b18245a7b5855.tar.gz
hostap-06-5cf40d9bfc1b5e4abbf43fc6106b18245a7b5855.tar.bz2
Fix WPS UPnP SSDP on 32-bit targets
The memcpy was using incorrect size (of pointer; should have been of data structure) for the client address. This ended up working on 64-bit targets, but left part of the address uninitialized on 32-bit targets. (cherry picked from commit bfd67fc44c66ac9fcda97f02a9fe5f01d1ed5728)
-rw-r--r--src/wps/wps_upnp_ssdp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wps/wps_upnp_ssdp.c b/src/wps/wps_upnp_ssdp.c
index 4931e51..47be476 100644
--- a/src/wps/wps_upnp_ssdp.c
+++ b/src/wps/wps_upnp_ssdp.c
@@ -461,7 +461,7 @@ static void msearchreply_state_machine_start(struct upnp_wps_device_sm *sm,
a->type = MSEARCH_REPLY;
a->state = 0;
a->sm = sm;
- os_memcpy(&a->client, client, sizeof(client));
+ os_memcpy(&a->client, client, sizeof(*client));
/* Wait time depending on MX value */
next_timeout_msec = (1000 * mx * (os_random() & 0xFF)) >> 8;
next_timeout_sec = next_timeout_msec / 1000;