diff options
author | Rich Salz <rsalz@openssl.org> | 2017-06-14 20:34:37 -0400 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2017-07-05 11:32:35 +1000 |
commit | 0904e79a6e6109240d5a552f2699408b26cf63ee (patch) | |
tree | df0b4928a751b05779164cf7dd84265407bea332 /crypto/bio/bss_file.c | |
parent | ff281ee8369350d88e8b57af139614f5683e1e8c (diff) |
Undo commit d420ac2
[extended tests]
Original text:
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>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/3701)
Diffstat (limited to 'crypto/bio/bss_file.c')
-rw-r--r-- | crypto/bio/bss_file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index ae9867e037..49d8f09bc5 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -271,15 +271,15 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr) b->shutdown = (int)num & BIO_CLOSE; if (num & BIO_FP_APPEND) { if (num & BIO_FP_READ) - OPENSSL_strlcpy(p, "a+", sizeof p); + strcpy(p, "a+"); else - OPENSSL_strlcpy(p, "a", sizeof p); + strcpy(p, "a"); } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE)) - OPENSSL_strlcpy(p, "r+", sizeof p); + strcpy(p, "r+"); else if (num & BIO_FP_WRITE) - OPENSSL_strlcpy(p, "w", sizeof p); + strcpy(p, "w"); else if (num & BIO_FP_READ) - OPENSSL_strlcpy(p, "r", sizeof p); + strcpy(p, "r"); else { BIOerr(BIO_F_FILE_CTRL, BIO_R_BAD_FOPEN_MODE); ret = 0; |