浏览代码

xmlrpc(s): fix '*' rpc_scan handling

The '*' modifier (marking the next parameters as optional) was not
properly handled (the current input parameter was "eaten").

Reported-by: Juha Heinanen  jh at tutpro com
Andrei Pelinescu-Onciul 16 年之前
父节点
当前提交
e792b7614a
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      modules_s/xmlrpc/xmlrpc.c

+ 3 - 3
modules_s/xmlrpc/xmlrpc.c

@@ -1220,9 +1220,9 @@ static int rpc_scan(rpc_ctx_t* ctx, char* fmt, ...)
 		switch(*fmt) {
 		case '*': /* start of optional parameters */
 			modifiers++;
-			/* no other action needed, for xmlrpc params are treated as
-			   optionals anyway */
-			break;
+			read++;
+			fmt++;
+			continue; /* do not advance ctx->act-param */
 		case 'b': /* Bool */
 		case 't': /* Date and time */
 		case 'd': /* Integer */