From: Bryon Gloden, CISSPĀ® Date: Tue, 2 Aug 2016 21:49:49 +0000 (-0400) Subject: Update local_scan.c X-Git-Tag: 1.3.2~63^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F796%2Fhead;p=rspamd.git 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 --- diff --git a/contrib/exim/local_scan.c b/contrib/exim/local_scan.c index 20d3ba246..3277bd879 100644 --- a/contrib/exim/local_scan.c +++ b/contrib/exim/local_scan.c @@ -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;