summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbeck <>2015-02-18 05:48:54 +0000
committerbeck <>2015-02-18 05:48:54 +0000
commit830b95c5b54ad6d7cf9c7394e982b2421e951d78 (patch)
treee7d88c242931dea834399b6263c4b43b7fa01d8a
parentfe5a1b127a8433e7b13c6ab22eeafa544fe26b27 (diff)
downloadopenbsd-830b95c5b54ad6d7cf9c7394e982b2421e951d78.tar.gz
openbsd-830b95c5b54ad6d7cf9c7394e982b2421e951d78.tar.bz2
openbsd-830b95c5b54ad6d7cf9c7394e982b2421e951d78.zip
fix coverity 105350 and 10345
ok miod@, doug@
-rw-r--r--src/usr.bin/openssl/certhash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usr.bin/openssl/certhash.c b/src/usr.bin/openssl/certhash.c
index 7458add906..2e64ffaac7 100644
--- a/src/usr.bin/openssl/certhash.c
+++ b/src/usr.bin/openssl/certhash.c
@@ -191,6 +191,7 @@ hashinfo_chain_sort(struct hashinfo **head)
191 } 191 }
192 entry->next = NULL; 192 entry->next = NULL;
193 193
194 free(list);
194 return (0); 195 return (0);
195} 196}
196 197
@@ -483,7 +484,7 @@ certhash_link(int dfd, struct dirent *dep, struct hashinfo **links)
483 if (!S_ISLNK(sb.st_mode)) 484 if (!S_ISLNK(sb.st_mode))
484 return (0); 485 return (0);
485 486
486 n = readlinkat(dfd, dep->d_name, target, sizeof(target)); 487 n = readlinkat(dfd, dep->d_name, target, sizeof(target) - 1);
487 if (n == -1) { 488 if (n == -1) {
488 fprintf(stderr, "failed to readlink %s\n", dep->d_name); 489 fprintf(stderr, "failed to readlink %s\n", dep->d_name);
489 return (-1); 490 return (-1);