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/evp | |
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/evp')
-rw-r--r-- | crypto/evp/evp_pbe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c index 354532d8de..ebc74aff41 100644 --- a/crypto/evp/evp_pbe.c +++ b/crypto/evp/evp_pbe.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -90,9 +90,9 @@ int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, char obj_tmp[80]; EVPerr(EVP_F_EVP_PBE_CIPHERINIT, EVP_R_UNKNOWN_PBE_ALGORITHM); if (!pbe_obj) - strcpy(obj_tmp, "NULL"); + OPENSSL_strlcpy(obj_tmp, "NULL", sizeof(obj_tmp)); else - i2t_ASN1_OBJECT(obj_tmp, sizeof obj_tmp, pbe_obj); + i2t_ASN1_OBJECT(obj_tmp, sizeof(obj_tmp), pbe_obj); ERR_add_error_data(2, "TYPE=", obj_tmp); return 0; } |