diff options
| author | jsing <> | 2019-04-01 15:48:50 +0000 |
|---|---|---|
| committer | jsing <> | 2019-04-01 15:48:50 +0000 |
| commit | 01a9fea5da51f3194be3ccfae8edee09154ed07a (patch) | |
| tree | 23217cb8e68454e193f1b8cc7b560afada2a45f2 /src/lib/libc | |
| parent | c668655bd37c10676da50f3d90a2cb88438f14c1 (diff) | |
| download | openbsd-01a9fea5da51f3194be3ccfae8edee09154ed07a.tar.gz openbsd-01a9fea5da51f3194be3ccfae8edee09154ed07a.tar.bz2 openbsd-01a9fea5da51f3194be3ccfae8edee09154ed07a.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@
Diffstat (limited to '')
| -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 | } |
