diff options
| author | tb <> | 2024-10-31 05:03:57 +0000 |
|---|---|---|
| committer | tb <> | 2024-10-31 05:03:57 +0000 |
| commit | d930ebf909a342f1f83e888c9560947e6e9bccf1 (patch) | |
| tree | 98fceead5aac6731961d456c178d36e765307006 /src/lib/libcrypto/ec | |
| parent | cbf960e440aca83f87c69f5104dcb115af4a368d (diff) | |
| download | openbsd-d930ebf909a342f1f83e888c9560947e6e9bccf1.tar.gz openbsd-d930ebf909a342f1f83e888c9560947e6e9bccf1.tar.bz2 openbsd-d930ebf909a342f1f83e888c9560947e6e9bccf1.zip | |
ec_point_to_octets: move out_len initialization up a bit
Diffstat (limited to 'src/lib/libcrypto/ec')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_convert.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ | |||
| 1 | /* $OpenBSD: ec_convert.c,v 1.5 2024/10/30 20:00:13 tb Exp $ */ | 1 | /* $OpenBSD: ec_convert.c,v 1.6 2024/10/31 05:03:57 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 | */ |
| @@ -374,11 +374,11 @@ ec_point_to_octets(const EC_GROUP *group, const EC_POINT *point, int form, | |||
| 374 | size_t len = 0; | 374 | size_t len = 0; |
| 375 | int ret = 0; | 375 | int ret = 0; |
| 376 | 376 | ||
| 377 | *out_len = 0; | ||
| 378 | |||
| 377 | if (out_buf != NULL && *out_buf != NULL) | 379 | if (out_buf != NULL && *out_buf != NULL) |
| 378 | goto err; | 380 | goto err; |
| 379 | 381 | ||
| 380 | *out_len = 0; | ||
| 381 | |||
| 382 | if ((len = EC_POINT_point2oct(group, point, form, NULL, 0, ctx)) == 0) | 382 | if ((len = EC_POINT_point2oct(group, point, form, NULL, 0, ctx)) == 0) |
| 383 | goto err; | 383 | goto err; |
| 384 | 384 | ||
