projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3831351
)
param build set: add errors to failure returns
author
Pauli
<pauli@openssl.org>
Mon, 10 Jan 2022 00:33:06 +0000
(11:33 +1100)
committer
Pauli
<pauli@openssl.org>
Wed, 12 Jan 2022 09:10:21 +0000
(20:10 +1100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17440)
crypto/param_build_set.c
patch
|
blob
|
history
diff --git
a/crypto/param_build_set.c
b/crypto/param_build_set.c
index 8b570ded96ebb45379fc0aa097b784b5065185c3..75400eea9e123c4a962fad6f2688d63659426d46 100644
(file)
--- a/
crypto/param_build_set.c
+++ b/
crypto/param_build_set.c
@@
-73,8
+73,10
@@
int ossl_param_build_set_bn_pad(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
return OSSL_PARAM_BLD_push_BN_pad(bld, key, bn, sz);
p = OSSL_PARAM_locate(p, key);
if (p != NULL) {
- if (sz > p->data_size)
+ if (sz > p->data_size) {
+ ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER);
return 0;
+ }
p->data_size = sz;
return OSSL_PARAM_set_BN(p, bn);
}