aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2014-06-10 16:07:13 -0700
committerDmitry Shmidt <dimitrysh@google.com>2014-06-10 16:07:13 -0700
commit09f57babfc1e4473db20ced4f58a4c9f082c8ed8 (patch)
tree481e7769580e2b922cbf6e8eb8b11aae077aa6ad /src/wps
parentb5d893b5dec601a58c3ce0fc9e5d6da3816ce97a (diff)
downloadandroid_external_wpa_supplicant_8-09f57babfc1e4473db20ced4f58a4c9f082c8ed8.tar.gz
android_external_wpa_supplicant_8-09f57babfc1e4473db20ced4f58a4c9f082c8ed8.tar.bz2
android_external_wpa_supplicant_8-09f57babfc1e4473db20ced4f58a4c9f082c8ed8.zip
Cumulative patch from commit d3b204694a39e6c57a4c6689b87f4192e1b93a06
d3b2046 P2P: Make the default p2p_find delay value configurable 3dacd3e atheros: Add support for new GCMP/CCMP/CMAC/GMAC cipher suites 737754d EAP-IKEv2: Remove obsolete ccns.pl project workarounds aa6bf6d eap_proxy: Check sm != NULL more consistently 4f4d51e TDLS: Add extra validation step for responder RSN IE length a01acc5 Check for EVENT_ASSOC data to be present for AP mode operation 1fde15a GAS server: Explicitly check that home realm is available aff0bee GAS server: Remove unused function parameter 86388af WPS: Check for theoretical gmtime() failure d75a5ae WPS ER: Fix UDN parser to handle missing field 0bbaa9b Validate driver extended capabilities length against buffer length 9c6c558 Interworking: Reject EAP configuration with unsupported inner method f2ca0e9 Check eap_get_name() return against NULL to silence static analyzer bc32bb7 Make a code path easier for static analyzers to understand fb958ea Check current_ssid on unexpected association event 2a57c33 Reserve QCA vendor specific nl80211 commands 20..33 84df167 nl80211: Add vendor attribute for interface index 9949483 The master branch is now used for v2.3 development Change-Id: Ib39c204aaa3ebcc909057f815e5e291e15e5df88 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_er.c15
-rw-r--r--src/wps/wps_upnp.c2
2 files changed, 11 insertions, 6 deletions
diff --git a/src/wps/wps_er.c b/src/wps/wps_er.c
index 8b2675e7..078ff727 100644
--- a/src/wps/wps_er.c
+++ b/src/wps/wps_er.c
@@ -579,12 +579,15 @@ static void wps_er_parse_device_description(struct wps_er_ap *ap,
wpa_printf(MSG_DEBUG, "WPS ER: serialNumber='%s'", ap->serial_number);
ap->udn = xml_get_first_item(data, "UDN");
- wpa_printf(MSG_DEBUG, "WPS ER: UDN='%s'", ap->udn);
- pos = os_strstr(ap->udn, "uuid:");
- if (pos) {
- pos += 5;
- if (uuid_str2bin(pos, ap->uuid) < 0)
- wpa_printf(MSG_DEBUG, "WPS ER: Invalid UUID in UDN");
+ if (ap->udn) {
+ wpa_printf(MSG_DEBUG, "WPS ER: UDN='%s'", ap->udn);
+ pos = os_strstr(ap->udn, "uuid:");
+ if (pos) {
+ pos += 5;
+ if (uuid_str2bin(pos, ap->uuid) < 0)
+ wpa_printf(MSG_DEBUG,
+ "WPS ER: Invalid UUID in UDN");
+ }
}
ap->upc = xml_get_first_item(data, "UPC");
diff --git a/src/wps/wps_upnp.c b/src/wps/wps_upnp.c
index 6fb3d4c5..f62b49e6 100644
--- a/src/wps/wps_upnp.c
+++ b/src/wps/wps_upnp.c
@@ -227,6 +227,8 @@ void format_date(struct wpabuf *buf)
t = time(NULL);
date = gmtime(&t);
+ if (date == NULL)
+ return;
wpabuf_printf(buf, "%s, %02d %s %d %02d:%02d:%02d GMT",
&weekday_str[date->tm_wday * 4], date->tm_mday,
&month_str[date->tm_mon * 4], date->tm_year + 1900,