summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKlaus Kämpf <kkaempf@suse.de>2010-03-29 10:51:37 +0200
committerKlaus Kämpf <kkaempf@suse.de>2010-03-29 10:51:37 +0200
commit8ce6713fd88474990a0dabd3695397a706bfbbba (patch)
tree6965cd6cdb1bbcd2c6e4f6f75cefb59b9b33e0b8 /src
parent6cdfd6c16973964596bda08a134f0d191f8c1736 (diff)
downloadwsmancli-8ce6713fd88474990a0dabd3695397a706bfbbba.tar.gz
wsmancli-8ce6713fd88474990a0dabd3695397a706bfbbba.tar.xz
wsmancli-8ce6713fd88474990a0dabd3695397a706bfbbba.zip
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)
Diffstat (limited to 'src')
-rw-r--r--src/wsman.c2
1 files changed, 1 insertions, 1 deletions
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 @@ static hash_t *wsman_options_get_properties(void)
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])) {