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 | 4c21b079b717d5003b1e81186258b3f1b385ec7b (patch) | |
tree | 46df26777cf04d538ea5682b3411d1b07706ad6a /lib | |
parent | f053945fd5dfc5bd07d97111e53f2dcefa173497 (diff) |
make sure s always has enough from for trailing \0. even though strlcpy will
truncate, thanks to itojun@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/rand/randfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libcrypto/rand/randfile.c b/lib/libcrypto/rand/randfile.c index 8e993360fae..663a36cb701 100644 --- a/lib/libcrypto/rand/randfile.c +++ b/lib/libcrypto/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; |