diff options
author | jsing <> | 2019-04-01 15:48:50 +0000 |
---|---|---|
committer | jsing <> | 2019-04-01 15:48:50 +0000 |
commit | 4930381ec87c8bda10e1b79689cc89a22b336200 (patch) | |
tree | 23217cb8e68454e193f1b8cc7b560afada2a45f2 | |
parent | a75b22a2cc094f47fbed5f4c583901562193c920 (diff) | |
download | openbsd-4930381ec87c8bda10e1b79689cc89a22b336200.tar.gz openbsd-4930381ec87c8bda10e1b79689cc89a22b336200.tar.bz2 openbsd-4930381ec87c8bda10e1b79689cc89a22b336200.zip |
Correct the return values from long_print.
BIO_print() returns -1 on failure, whereas the ASN print functions need to
return 0.
ok beck@, tb@
-rw-r--r-- | src/lib/libcrypto/asn1/x_long.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/x_long.c b/src/lib/libcrypto/asn1/x_long.c index efafce15fe..61685c31a3 100644 --- a/src/lib/libcrypto/asn1/x_long.c +++ b/src/lib/libcrypto/asn1/x_long.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x_long.c,v 1.13 2019/03/31 14:41:40 jsing Exp $ */ | 1 | /* $OpenBSD: x_long.c,v 1.14 2019/04/01 15:48:50 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -210,5 +210,8 @@ static int | |||
210 | long_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it, int indent, | 210 | long_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it, int indent, |
211 | const ASN1_PCTX *pctx) | 211 | const ASN1_PCTX *pctx) |
212 | { | 212 | { |
213 | return BIO_printf(out, "%ld\n", *(long *)pval); | 213 | if (BIO_printf(out, "%ld\n", *(long *)pval) <= 0) |
214 | return 0; | ||
215 | |||
216 | return 1; | ||
214 | } | 217 | } |