diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.bin/openssl/certhash.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/usr.bin/openssl/certhash.c b/src/usr.bin/openssl/certhash.c index 31c4899fae..a4417a2b26 100644 --- a/src/usr.bin/openssl/certhash.c +++ b/src/usr.bin/openssl/certhash.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: certhash.c,v 1.18 2021/08/28 08:16:39 tb Exp $ */ | 1 | /* $OpenBSD: certhash.c,v 1.19 2021/10/23 08:13:48 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014, 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014, 2015 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -490,6 +490,10 @@ certhash_link(struct dirent *dep, struct hashinfo **links) | |||
| 490 | fprintf(stderr, "failed to readlink %s\n", dep->d_name); | 490 | fprintf(stderr, "failed to readlink %s\n", dep->d_name); |
| 491 | return (-1); | 491 | return (-1); |
| 492 | } | 492 | } |
| 493 | if (n >= sizeof(target) - 1) { | ||
| 494 | fprintf(stderr, "symbolic link is too long %s\n", dep->d_name); | ||
| 495 | return (-1); | ||
| 496 | } | ||
| 493 | target[n] = '\0'; | 497 | target[n] = '\0'; |
| 494 | 498 | ||
| 495 | hi = hashinfo_from_linkname(dep->d_name, target); | 499 | hi = hashinfo_from_linkname(dep->d_name, target); |
