summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2024-11-06 09:14:40 +0000
committertb <>2024-11-06 09:14:40 +0000
commitae40adbfc003e8263a32f868f8070361fc51cdeb (patch)
tree8e2288a2a2e7244b4f7341051d5cf2880ff45756 /src/lib
parent20567b9a7f9ca8de43817ce9003d72e58e9b361f (diff)
downloadopenbsd-ae40adbfc003e8263a32f868f8070361fc51cdeb.tar.gz
openbsd-ae40adbfc003e8263a32f868f8070361fc51cdeb.tar.bz2
openbsd-ae40adbfc003e8263a32f868f8070361fc51cdeb.zip
EC_GROUP_set_seed(): flip order of seed and len null checks
requested by jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c
index b1580d653f..b961a2e17c 100644
--- a/src/lib/libcrypto/ec/ec_lib.c
+++ b/src/lib/libcrypto/ec/ec_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_lib.c,v 1.82 2024/11/06 09:13:11 tb Exp $ */ 1/* $OpenBSD: ec_lib.c,v 1.83 2024/11/06 09:14:40 tb Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -457,7 +457,7 @@ EC_GROUP_set_seed(EC_GROUP *group, const unsigned char *seed, size_t len)
457 group->seed = NULL; 457 group->seed = NULL;
458 group->seed_len = 0; 458 group->seed_len = 0;
459 459
460 if (len == 0 || seed == NULL) 460 if (seed == NULL || len == 0)
461 return 1; 461 return 1;
462 462
463 if ((group->seed = malloc(len)) == NULL) 463 if ((group->seed = malloc(len)) == NULL)