From 957b11334a7afb14537322f0e4795b2e368b3f59 Mon Sep 17 00:00:00 2001 From: beck <> Date: Sun, 29 Jan 2017 17:49:23 +0000 Subject: Send the function codes from the error functions to the bit bucket, as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@ --- src/lib/libcrypto/asn1/f_enum.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/lib/libcrypto/asn1/f_enum.c') diff --git a/src/lib/libcrypto/asn1/f_enum.c b/src/lib/libcrypto/asn1/f_enum.c index 7f064edb04..64feb97dc4 100644 --- a/src/lib/libcrypto/asn1/f_enum.c +++ b/src/lib/libcrypto/asn1/f_enum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: f_enum.c,v 1.14 2014/07/11 08:44:47 jsing Exp $ */ +/* $OpenBSD: f_enum.c,v 1.15 2017/01/29 17:49:22 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -150,16 +150,14 @@ a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size) k = 0; i -= again; if (i % 2 != 0) { - ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, - ASN1_R_ODD_NUMBER_OF_CHARS); + ASN1error(ASN1_R_ODD_NUMBER_OF_CHARS); goto err; } i /= 2; if (num + i > slen) { sp = realloc(s, num + i); if (sp == NULL) { - ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, - ERR_R_MALLOC_FAILURE); + ASN1error(ERR_R_MALLOC_FAILURE); goto err; } s = sp; @@ -175,8 +173,7 @@ a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size) else if ((m >= 'A') && (m <= 'F')) m = m - 'A' + 10; else { - ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, - ASN1_R_NON_HEX_CHARACTERS); + ASN1error(ASN1_R_NON_HEX_CHARACTERS); goto err; } s[num + j] <<= 4; @@ -194,7 +191,7 @@ a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size) return (1); err_sl: - ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ASN1_R_SHORT_LINE); + ASN1error(ASN1_R_SHORT_LINE); err: free(s); return (ret); -- cgit v1.2.3-55-g6feb