X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fmalware.c;h=7de913f49489ac6223b2bd5eda44371563c685ab;hb=d9d29e0555e6a3bf33cc616693d98c982796201f;hp=864564ffc926edb4d2a563db6236897779e1e66f;hpb=9e949f00f404d3672b1ecd7c1bfd5e8927a3301d;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/malware.c b/src/src/malware.c index 864564ffc..7de913f49 100644 --- a/src/src/malware.c +++ b/src/src/malware.c @@ -115,7 +115,7 @@ malware_in_file(uschar *eml_filename) { /* spool_mbox() assumes various parameters exist, when creating the relevant directory and the email within */ (void) string_format(message_id_buf, sizeof(message_id_buf), - "dummy-%d", pseudo_random_number(INT_MAX)); + "dummy-%d", vaguely_random_number(INT_MAX)); message_id = message_id_buf; sender_address = US"malware-sender@example.net"; return_path = US""; @@ -131,6 +131,9 @@ malware_in_file(uschar *eml_filename) { set, but if that changes, then it should apply to these tests too */ unspool_mbox(); + /* silence static analysis tools */ + message_id = NULL; + return ret; } @@ -1071,7 +1074,7 @@ static int malware_internal(uschar **listptr, uschar *eml_filename, BOOL faking) cmdline_trigger_re = pcre_compile(CS cmdline_trigger, PCRE_COPT, (const char **)&rerror, &roffset, NULL); if (cmdline_trigger_re == NULL) { log_write(0, LOG_MAIN|LOG_PANIC, - "malware acl condition: regular expression error in '%s': %s at offset %d", cmdline_trigger_re, rerror, roffset); + "malware acl condition: regular expression error in '%s': %s at offset %d", cmdline_trigger, rerror, roffset); return DEFER; }; @@ -1089,7 +1092,7 @@ static int malware_internal(uschar **listptr, uschar *eml_filename, BOOL faking) cmdline_regex_re = pcre_compile(CS cmdline_regex, PCRE_COPT, (const char **)&rerror, &roffset, NULL); if (cmdline_regex_re == NULL) { log_write(0, LOG_MAIN|LOG_PANIC, - "malware acl condition: regular expression error in '%s': %s at offset %d", cmdline_regex_re, rerror, roffset); + "malware acl condition: regular expression error in '%s': %s at offset %d", cmdline_regex, rerror, roffset); return DEFER; };