Browse Source

Update local_scan.c

[../rspamd-master/contrib/exim/local_scan.c:630]: (error) Uninitialized variable: rej

It's always good to initialize integer variables, at least to 0, because if you try to retrieve its value before it gets assigned any actual (non-garbage) value, then it results in undefined behavior.

Found by https://github.com/bryongloden/cppcheck
tags/1.3.2
Bryon Gloden, CISSP® 8 years ago
parent
commit
8086172ad1
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      contrib/exim/local_scan.c

+ 1
- 1
contrib/exim/local_scan.c View File

@@ -485,7 +485,7 @@ repeat_read:
int WaitForScanResult (uschar **resStr)
{
int Len, i;
int rej, result = LOCAL_SCAN_ACCEPT, answer_size, spm = 0, code = 0, ns = 0, smb = 0, urf = 0;
int rej = 0, result = LOCAL_SCAN_ACCEPT, answer_size, spm = 0, code = 0, ns = 0, smb = 0, urf = 0;
char *strP, *tok, *tmp;
char *hdr = NULL, *hdrv = NULL, *spmStr = NULL, *symbols=NULL, *urls=NULL;
char answ [4096], state[6], metric[128], back;

Loading…
Cancel
Save