summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2015-05-20 04:33:35 +0000
committermiod <miod@openbsd.org>2015-05-20 04:33:35 +0000
commit115eecf6930562865b7847a8d7d746383b9a8f8f (patch)
tree299f8f4a8bdd82121850b2e034cb2baa43db67ce
parentRemove cubieboard specific gpio led setting. (diff)
downloadwireguard-openbsd-115eecf6930562865b7847a8d7d746383b9a8f8f.tar.xz
wireguard-openbsd-115eecf6930562865b7847a8d7d746383b9a8f8f.zip
No need to check the return value of memcpy() if you actually checked this
pointer for NULL the line above; ok doug@
-rw-r--r--lib/libcrypto/ec/ec_lib.c5
-rw-r--r--lib/libssl/src/crypto/ec/ec_lib.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/libcrypto/ec/ec_lib.c b/lib/libcrypto/ec/ec_lib.c
index d36c2c2e6e2..a12a2ffbb6f 100644
--- a/lib/libcrypto/ec/ec_lib.c
+++ b/lib/libcrypto/ec/ec_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_lib.c,v 1.17 2015/04/29 00:11:12 doug Exp $ */
+/* $OpenBSD: ec_lib.c,v 1.18 2015/05/20 04:33:35 miod Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
@@ -216,8 +216,7 @@ EC_GROUP_copy(EC_GROUP * dest, const EC_GROUP * src)
dest->seed = malloc(src->seed_len);
if (dest->seed == NULL)
return 0;
- if (!memcpy(dest->seed, src->seed, src->seed_len))
- return 0;
+ memcpy(dest->seed, src->seed, src->seed_len);
dest->seed_len = src->seed_len;
} else {
free(dest->seed);
diff --git a/lib/libssl/src/crypto/ec/ec_lib.c b/lib/libssl/src/crypto/ec/ec_lib.c
index d36c2c2e6e2..a12a2ffbb6f 100644
--- a/lib/libssl/src/crypto/ec/ec_lib.c
+++ b/lib/libssl/src/crypto/ec/ec_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_lib.c,v 1.17 2015/04/29 00:11:12 doug Exp $ */
+/* $OpenBSD: ec_lib.c,v 1.18 2015/05/20 04:33:35 miod Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
@@ -216,8 +216,7 @@ EC_GROUP_copy(EC_GROUP * dest, const EC_GROUP * src)
dest->seed = malloc(src->seed_len);
if (dest->seed == NULL)
return 0;
- if (!memcpy(dest->seed, src->seed, src->seed_len))
- return 0;
+ memcpy(dest->seed, src->seed, src->seed_len);
dest->seed_len = src->seed_len;
} else {
free(dest->seed);