summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2015-02-18 05:48:54 +0000
committerbeck <beck@openbsd.org>2015-02-18 05:48:54 +0000
commit5558f497ffe1203031a961f1e30c499b4ac581d8 (patch)
treef20f7f02e1bafbebe41c1780bad88acd06d0ba9f
parentDon't abuse Aq for arguments, and use a prettier escape for dashes. (diff)
downloadwireguard-openbsd-5558f497ffe1203031a961f1e30c499b4ac581d8.tar.xz
wireguard-openbsd-5558f497ffe1203031a961f1e30c499b4ac581d8.zip
fix coverity 105350 and 10345
ok miod@, doug@
-rw-r--r--usr.bin/openssl/certhash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/openssl/certhash.c b/usr.bin/openssl/certhash.c
index 7458add906f..2e64ffaac73 100644
--- a/usr.bin/openssl/certhash.c
+++ b/usr.bin/openssl/certhash.c
@@ -191,6 +191,7 @@ hashinfo_chain_sort(struct hashinfo **head)
}
entry->next = NULL;
+ free(list);
return (0);
}
@@ -483,7 +484,7 @@ certhash_link(int dfd, struct dirent *dep, struct hashinfo **links)
if (!S_ISLNK(sb.st_mode))
return (0);
- n = readlinkat(dfd, dep->d_name, target, sizeof(target));
+ n = readlinkat(dfd, dep->d_name, target, sizeof(target) - 1);
if (n == -1) {
fprintf(stderr, "failed to readlink %s\n", dep->d_name);
return (-1);