... | ... |
@@ -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; |