diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2001-01-12 18:16:00 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2001-01-12 18:16:00 +0000 |
commit | d5479b4e0f25357997bc95f30ff5d95c1750c416 (patch) | |
tree | 177e3b56f8a08d99923f0a3ffe3f6ed9b902ddfe | |
parent | c3fc24a76d3ba3726e698d79d99a811b8836fb90 (diff) |
make sure s always has enough from for trailing \0. even though strlcpy will
truncate, thanks to itojun@
-rw-r--r-- | lib/libssl/src/crypto/rand/randfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/rand/randfile.c b/lib/libssl/src/crypto/rand/randfile.c index 8e993360fae..663a36cb701 100644 --- a/lib/libssl/src/crypto/rand/randfile.c +++ b/lib/libssl/src/crypto/rand/randfile.c @@ -221,7 +221,7 @@ const char *RAND_file_name(char *buf, int size) if (issetugid() == 0) s = getenv("RANDFILE"); - if (s != NULL && *s && strlen(s) < size) + if (s != NULL && *s && strlen(s) + 1 < size) { strlcpy(buf,s,size); ret=buf; |