diff --git a/src/wps/wps_er.c b/src/wps/wps_er.c index 8950ab43e..f29eb9c09 100644 --- a/src/wps/wps_er.c +++ b/src/wps/wps_er.c @@ -479,7 +479,8 @@ static void wps_er_parse_device_description(struct wps_er_ap *ap, pos = os_strstr(ap->udn, "uuid:"); if (pos) { pos += 5; - uuid_str2bin(pos, ap->uuid); + 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_er_ssdp.c b/src/wps/wps_er_ssdp.c index 83879db22..f108435d1 100644 --- a/src/wps/wps_er_ssdp.c +++ b/src/wps/wps_er_ssdp.c @@ -96,7 +96,12 @@ static void wps_er_ssdp_rx(int sd, void *eloop_ctx, void *sock_ctx) pos2 += 5; while (*pos2 == ' ') pos2++; - uuid_str2bin(pos2, uuid); + if (uuid_str2bin(pos2, uuid) < 0) { + wpa_printf(MSG_DEBUG, "WPS ER: " + "Invalid UUID in USN: %s", + pos2); + return; + } } } }