diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2015-09-25 13:51:27 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-09-25 20:22:27 -0400 |
commit | c9c84a13916aa5c5c58912b49839e72fe82b23f5 (patch) | |
tree | 3b7779ae317e2336d1e76d2e337ae61565191ca8 /apps/rehash.c | |
parent | 5db6336dee6701ddfc3a234383e522295645c6b0 (diff) | |
download | openssl-c9c84a13916aa5c5c58912b49839e72fe82b23f5.tar.gz |
GH408 follow-on: update buflen
Some builds break, as documented in:
https://github.com/openssl/openssl/pull/408#issuecomment-142971427
This fixes it.
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'apps/rehash.c')
-rw-r--r-- | apps/rehash.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/rehash.c b/apps/rehash.c index dbaea10489..e85265d1e6 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -74,6 +74,9 @@ # include <openssl/x509.h> +# ifndef NAME_MAX +# define NAME_MAX 255 +# endif # define MAX_COLLISIONS 256 typedef struct hentry_st { @@ -319,7 +322,8 @@ static int do_dir(const char *dirname, enum Hash h) } buflen = strlen(dirname); pathsep = (buflen && dirname[buflen - 1] == '/') ? "" : "/"; - buf = app_malloc(PATH_MAX, "filename buffer"); + buflen += NAME_MAX + 1 + 1; + buf = app_malloc(buflen, "filename buffer"); if (verbose) BIO_printf(bio_out, "Doing %s\n", dirname); |