-b cannot be used to provide urls
Opened this issue · 1 comments
tmm1 commented
# wsdd2 -b "vendorurl:https://example.com"
bad key:val '://example.com'
On https://docs.microsoft.com/en-us/windows/win32/api/wsdtypes/ns-wsdtypes-wsd_this_model_metadata you can see urls are expected:
<wsd:ManufacturerURL>
http://www.adatum.com
</wsd:ManufacturerURL>
xnoreq commented
Patch:
---
wsd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/wsd.c b/wsd.c
index 0b4b3d2..3593aa8 100644
--- a/wsd.c
+++ b/wsd.c
@@ -214,9 +214,9 @@ int set_getresp(const char *str, const char **next)
val = p;
/* Look for end of value. */
- while (*p && *p != ':' && *p != ',')
+ while (*p && *p != ',')
p++;
- if (*p && *p != ',')
+ if (*p)
goto exit;
vallen = p - val;
@@ -225,7 +225,7 @@ int set_getresp(const char *str, const char **next)
/* Look for key in lookup table. */
for (i = 0; bootinfo[i].key; i++)
- if (!strncasecmp(bootinfo[i].key, str, keylen))
+ if (keylen == strlen(bootinfo[i].key) - 1 && !strncasecmp(bootinfo[i].key, str, keylen))
break;
if (!bootinfo[i].key)
--