Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-06-12 04:42:14 +0300
committerAdam Langley <agl@google.com>2015-06-15 20:52:40 +0300
commit1c703cb0c1e73d49af6bc837a7442f06a3dbcf08 (patch)
tree074de75247d9f774e282d439e5a438f644ead8b4 /include/openssl/bn.h
parent3a9e1fba0e3bcf014caa2df143a70475068447dc (diff)
Check for BN_copy failures.
BN_copy can fail on malloc failure. The case in crypto/rsa was causing the malloc tests in all_tests.go to infinite loop. Change-Id: Id5900512013fba9960444d78a8c056aa4314fb2d Reviewed-on: https://boringssl-review.googlesource.com/5110 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl/bn.h')
-rw-r--r--include/openssl/bn.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/openssl/bn.h b/include/openssl/bn.h
index ec1c8ff5..a61e5cfa 100644
--- a/include/openssl/bn.h
+++ b/include/openssl/bn.h
@@ -182,7 +182,8 @@ OPENSSL_EXPORT void BN_clear_free(BIGNUM *bn);
* allocated BIGNUM on success or NULL otherwise. */
OPENSSL_EXPORT BIGNUM *BN_dup(const BIGNUM *src);
-/* BN_copy sets |dest| equal to |src| and returns |dest|. */
+/* BN_copy sets |dest| equal to |src| and returns |dest| or NULL on allocation
+ * failure. */
OPENSSL_EXPORT BIGNUM *BN_copy(BIGNUM *dest, const BIGNUM *src);
/* BN_clear sets |bn| to zero and erases the old data. */