From: Jeremy Harris Date: Sat, 20 Aug 2016 16:52:15 +0000 (+0100) Subject: Tidying: coverity issues X-Git-Tag: exim-4_88_RC1~21 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ad6f549910317aed78d06b5e5fa95d8db00b42e5;p=exim.git Tidying: coverity issues --- diff --git a/src/src/parse.c b/src/src/parse.c index 7a072558a..9b7069f9e 100644 --- a/src/src/parse.c +++ b/src/src/parse.c @@ -1460,15 +1460,16 @@ for (;;) temp = *p; *p = '\0'; - if ((fd2 = openat(fd, q, O_RDONLY|O_NOFOLLOW)) < 0) + fd2 = openat(fd, q, O_RDONLY|O_NOFOLLOW); + close(fd); + *p = temp; + if (fd2 < 0) { *error = string_sprintf("failed to open %s (component of included " "file); could be symbolic link", filename); return FF_ERROR; } - close(fd); fd = fd2; - *p = temp; } f = fdopen(fd, "rb"); } diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c index ccd7784f3..15f868e63 100644 --- a/src/src/pdkim/pdkim.c +++ b/src/src/pdkim/pdkim.c @@ -1330,7 +1330,7 @@ while (sig) { BOOL is_sha1 = sig->algo == PDKIM_ALGO_RSA_SHA1; hctx hhash_ctx; - uschar * sig_hdr; + uschar * sig_hdr = US""; blob hhash; blob hdata; int hdata_alloc = 0;