summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);