diff options
author | Klaus Kämpf <kkaempf@suse.de> | 2010-03-29 10:51:37 +0200 |
---|---|---|
committer | Klaus Kämpf <kkaempf@suse.de> | 2010-03-29 10:51:37 +0200 |
commit | 8ce6713fd88474990a0dabd3695397a706bfbbba (patch) | |
tree | 6965cd6cdb1bbcd2c6e4f6f75cefb59b9b33e0b8 | |
parent | 6cdfd6c16973964596bda08a134f0d191f8c1736 (diff) | |
download | wsmancli-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)
-rw-r--r-- | src/wsman.c | 2 |
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])) { |