projects
/
libeap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f6050e
)
WPS ER: Check uuid_str2bin() return value
author
Jouni Malinen
<j@w1.fi>
Sun, 10 Jan 2010 20:12:55 +0000
(22:12 +0200)
committer
Jouni Malinen
<j@w1.fi>
Sun, 10 Jan 2010 20:12:55 +0000
(22:12 +0200)
src/wps/wps_er.c
patch
|
blob
|
history
src/wps/wps_er_ssdp.c
patch
|
blob
|
history
diff --git
a/src/wps/wps_er.c
b/src/wps/wps_er.c
index
8950ab4
..
f29eb9c
100644
(file)
--- 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
83879db
..
f108435
100644
(file)
--- 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;
+ }
}
}
}