diff options
author | tb <> | 2023-06-23 10:33:12 +0000 |
---|---|---|
committer | tb <> | 2023-06-23 10:33:12 +0000 |
commit | ec0ae1a74a9e2dde4f3254226cae427ad5964742 (patch) | |
tree | 6883622bfdb0967c0a57d097de9987dc85e33e75 /src | |
parent | 792633b66d182d196e9fb5ce5b190714ad26549c (diff) | |
download | openbsd-ec0ae1a74a9e2dde4f3254226cae427ad5964742.tar.gz openbsd-ec0ae1a74a9e2dde4f3254226cae427ad5964742.tar.bz2 openbsd-ec0ae1a74a9e2dde4f3254226cae427ad5964742.zip |
Fix return check of bn_hex2bn_cbs()
It returns a length, not a Boolean, so check for 0 explicitly. This is
purely cosmetic.
ok jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/bn/bn_convert.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_convert.c b/src/lib/libcrypto/bn/bn_convert.c index 0dbe20046b..9ad9f58f93 100644 --- a/src/lib/libcrypto/bn/bn_convert.c +++ b/src/lib/libcrypto/bn/bn_convert.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_convert.c,v 1.10 2023/06/23 10:31:27 tb Exp $ */ | 1 | /* $OpenBSD: bn_convert.c,v 1.11 2023/06/23 10:33:12 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -291,13 +291,13 @@ BN_asc2bn(BIGNUM **bnp, const char *s) | |||
291 | goto decimal; | 291 | goto decimal; |
292 | if (v != 'X' && v != 'x') | 292 | if (v != 'X' && v != 'x') |
293 | goto decimal; | 293 | goto decimal; |
294 | if (!bn_hex2bn_cbs(bnp, &cbs_hex)) | 294 | if (bn_hex2bn_cbs(bnp, &cbs_hex) == 0) |
295 | return 0; | 295 | return 0; |
296 | 296 | ||
297 | goto done; | 297 | goto done; |
298 | 298 | ||
299 | decimal: | 299 | decimal: |
300 | if (!bn_dec2bn_cbs(bnp, &cbs)) | 300 | if (bn_dec2bn_cbs(bnp, &cbs) == 0) |
301 | return 0; | 301 | return 0; |
302 | 302 | ||
303 | done: | 303 | done: |