Fix handling empty properties on command line
Attempting to set a property value to an empty string causes invalid XML
characters to be written into the Put request which is then rejected by
the server with a WsMan Fault response.
e.g. wsman put url -k propertyname=""
(Found and fixed by Trevor Witten)
diff --git a/src/wsman.c b/src/wsman.c
index 0ab6a17..6e7b3a7 100644
--- a/src/wsman.c
+++ b/src/wsman.c
@@ -484,7 +484,7 @@
hash_t *h = hash_create(HASHCOUNT_T_MAX, 0, 0);
while (properties != NULL && properties[c] != NULL) {
- char *cc[3];
+ char *cc[3] = { NULL, NULL, NULL };
u_tokenize1(cc, 2, properties[c], '=');
if (!hash_lookup(h, cc[0])) {
if (!hash_alloc_insert(h, cc[0], cc[1])) {