Explorar o código

xmlrpc: fix handling the optional param spec on no more params

Daniel-Constantin Mierla %!s(int64=8) %!d(string=hai) anos
pai
achega
9483efe6af
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      src/modules/xmlrpc/xmlrpc.c

+ 7 - 1
src/modules/xmlrpc/xmlrpc.c

@@ -1533,7 +1533,13 @@ static int rpc_scan(rpc_ctx_t* ctx, char* fmt, ...)
 	f=(autoconvert?GET_X_AUTOCONV:0) |
 		(lflf2crlf?GET_X_LFLF2CRLF:0);
 	while(*fmt) {
-		if (!ctx->act_param) goto error;
+		if (!ctx->act_param) {
+			if(*fmt=='*') {
+				break;
+			} else {
+				goto error;
+			}
+		}
 		value = ctx->act_param->xmlChildrenNode;
 
 		switch(*fmt) {