From ae40adbfc003e8263a32f868f8070361fc51cdeb Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 6 Nov 2024 09:14:40 +0000 Subject: EC_GROUP_set_seed(): flip order of seed and len null checks requested by jsing --- src/lib/libcrypto/ec/ec_lib.c | 4 ++-- 1 file 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 @@ -/* $OpenBSD: ec_lib.c,v 1.82 2024/11/06 09:13:11 tb Exp $ */ +/* $OpenBSD: ec_lib.c,v 1.83 2024/11/06 09:14:40 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -457,7 +457,7 @@ EC_GROUP_set_seed(EC_GROUP *group, const unsigned char *seed, size_t len) group->seed = NULL; group->seed_len = 0; - if (len == 0 || seed == NULL) + if (seed == NULL || len == 0) return 1; if ((group->seed = malloc(len)) == NULL) -- cgit v1.2.3-55-g6feb