Browse code

cid 12151/12150 - correct condition for checking allmatch in parsing msxml documents (revised)

Kevin Lin authored on 2015/08/22 03:40:27
Showing 1 changed files
... ...
@@ -376,7 +376,7 @@ static int msxml_parse_element(struct msxml_ctx *mxctx, xmlTextReaderPtr reader,
376 376
                     if (!(ctx->engine->keeptmp))
377 377
                         cli_unlink(tempfile);
378 378
                     free(tempfile);
379
-                    if (ret != CL_SUCCESS && (SCAN_ALL || ret != CL_VIRUS)) {
379
+                    if (ret != CL_SUCCESS && (ret != CL_VIRUS || (!SCAN_ALL && ret == CL_VIRUS))) {
380 380
                         return ret;
381 381
                     } else if (SCAN_ALL && ret == CL_VIRUS) {
382 382
                         virus = 1;