aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-15 19:24:15 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-15 19:24:15 (GMT)
commit56906d06c79a9ce0f09dc1d2732edd6f68ea2691 (patch)
tree8ce85032feba243e4daf48979a280a1b89e30a3e /src/wps
parent6e9220160c517d9d155ad2c192437a212ba64594 (diff)
downloadhostap-56906d06c79a9ce0f09dc1d2732edd6f68ea2691.zip
hostap-56906d06c79a9ce0f09dc1d2732edd6f68ea2691.tar.gz
hostap-56906d06c79a9ce0f09dc1d2732edd6f68ea2691.tar.bz2
WPS ER: Fix SSDP CACHE-CONTROL line parser
Incorrect number of bytes was skipped from the beginning of the line which resulted in the loop skipping spaces doing nothing. However, the following operation was simply looking for the max-age parameter with os_strstr(), so this did not have any effect on functionality. Fix the number of bytes to skip and remove the unneeded loop to skip spaces. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_er_ssdp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wps/wps_er_ssdp.c b/src/wps/wps_er_ssdp.c
index e381fec..280b2b3 100644
--- a/src/wps/wps_er_ssdp.c
+++ b/src/wps/wps_er_ssdp.c
@@ -78,9 +78,7 @@ static void wps_er_ssdp_rx(int sd, void *eloop_ctx, void *sock_ctx)
if (os_strstr(start, "ssdp:byebye"))
byebye = 1;
} else if (os_strncasecmp(start, "CACHE-CONTROL:", 14) == 0) {
- start += 9;
- while (*start == ' ')
- start++;
+ start += 14;
pos2 = os_strstr(start, "max-age=");
if (pos2 == NULL)
continue;