diff options
author | Pauli <paul.dale@oracle.com> | 2017-07-06 14:56:20 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2017-07-07 15:45:55 +1000 |
commit | a2371fa93365cc0bc0e46b9d65f3a47a074b1c30 (patch) | |
tree | c4751256bc9a1e3d2b20bad3becd6b17aec2c9f4 /crypto/x509/by_dir.c | |
parent | a7ff57965b81ce4fd73a18266ce29abf6b909fdb (diff) |
Trivial bounds checking.
Bounds checking strpy, strcat and sprintf.
These are the remaining easy ones to cover a recently removed commit.
Some are trivial, some have been modified and a couple left as they are because the reverted change didn't bounds check properly.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3871)
Diffstat (limited to 'crypto/x509/by_dir.c')
-rw-r--r-- | crypto/x509/by_dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index b519dc45da..201ed12c45 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -295,8 +295,8 @@ static int get_cert_by_subject(X509_LOOKUP *xl, X509_LOOKUP_TYPE type, BIO_snprintf(b->data, b->max, "%s%08lx.%s%d", ent->dir, h, postfix, k); } else { - sprintf(b->data, - "%s%c%08lx.%s%d", ent->dir, c, h, postfix, k); + BIO_snprintf(b->data, b->max, + "%s%c%08lx.%s%d", ent->dir, c, h, postfix, k); } #ifndef OPENSSL_NO_POSIX_IO # ifdef _WIN32 |