diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2016-08-20 17:52:15 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2016-09-01 21:16:13 +0100 |
commit | ad6f549910317aed78d06b5e5fa95d8db00b42e5 (patch) | |
tree | c68787dc536a510f90fe6c933ca3eccc7a4da517 | |
parent | 45bd315dc080b8f77679ba5ae60e35b0d8c9e97c (diff) |
Tidying: coverity issues
-rw-r--r-- | src/src/parse.c | 7 | ||||
-rw-r--r-- | src/src/pdkim/pdkim.c | 2 |
2 files changed, 5 insertions, 4 deletions
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; |