diff options
author | Richard Levitte <levitte@openssl.org> | 2003-12-27 14:40:17 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2003-12-27 14:40:17 +0000 |
commit | d420ac2c7d4ba9d99ff2c257a3ad71ecc6d876e2 (patch) | |
tree | 84414c7d794c6286588d2042f060036378311348 /apps/enc.c | |
parent | b79aa47a0c8478bea62fc2bb55f99e0be172da3d (diff) | |
download | openssl-new-d420ac2c7d4ba9d99ff2c257a3ad71ecc6d876e2.tar.gz |
Use BUF_strlcpy() instead of strcpy().
Use BUF_strlcat() instead of strcat().
Use BIO_snprintf() instead of sprintf().
In some cases, keep better track of buffer lengths.
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
Diffstat (limited to 'apps/enc.c')
-rw-r--r-- | apps/enc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/enc.c b/apps/enc.c index ae18452e86..69f4bebcb9 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -373,9 +373,9 @@ bad: { char buf[200]; - sprintf(buf,"enter %s %s password:", - OBJ_nid2ln(EVP_CIPHER_nid(cipher)), - (enc)?"encryption":"decryption"); + BIO_snprintf(buf,sizeof buf,"enter %s %s password:", + OBJ_nid2ln(EVP_CIPHER_nid(cipher)), + (enc)?"encryption":"decryption"); strbuf[0]='\0'; i=EVP_read_pw_string((char *)strbuf,SIZE,buf,enc); if (i == 0) |