From 8ce6713fd88474990a0dabd3695397a706bfbbba Mon Sep 17 00:00:00 2001 From: Klaus Kämpf Date: Mon, 29 Mar 2010 10:51:37 +0200 Subject: 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) --- src/wsman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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])) { -- cgit