summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/src/parse.c7
-rw-r--r--src/src/pdkim/pdkim.c2
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;