From 5902169fca3f77e8990a326628063ffd24ee2db1 Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 31 Oct 2024 05:03:57 +0000 Subject: ec_point_to_octets: move out_len initialization up a bit --- src/lib/libcrypto/ec/ec_convert.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/ec/ec_convert.c b/src/lib/libcrypto/ec/ec_convert.c index cebb02b0e7..a151850f46 100644 --- a/src/lib/libcrypto/ec/ec_convert.c +++ b/src/lib/libcrypto/ec/ec_convert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_convert.c,v 1.5 2024/10/30 20:00:13 tb Exp $ */ +/* $OpenBSD: ec_convert.c,v 1.6 2024/10/31 05:03:57 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -374,11 +374,11 @@ ec_point_to_octets(const EC_GROUP *group, const EC_POINT *point, int form, size_t len = 0; int ret = 0; + *out_len = 0; + if (out_buf != NULL && *out_buf != NULL) goto err; - *out_len = 0; - if ((len = EC_POINT_point2oct(group, point, form, NULL, 0, ctx)) == 0) goto err; -- cgit v1.2.3-55-g6feb