WPS ER: Check uuid_str2bin() return value

This commit is contained in:
Jouni Malinen 2010-01-10 22:12:55 +02:00
parent 4f6050e796
commit 68fd595fa5
2 changed files with 8 additions and 2 deletions

View file

@ -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");

View file

@ -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;
}
}
}
}