diff options
Diffstat (limited to 'lib/libcrypto/asn1/x_long.c')
-rw-r--r-- | lib/libcrypto/asn1/x_long.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/asn1/x_long.c b/lib/libcrypto/asn1/x_long.c index 61685c31a37..8b11f14217f 100644 --- a/lib/libcrypto/asn1/x_long.c +++ b/lib/libcrypto/asn1/x_long.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_long.c,v 1.14 2019/04/01 15:48:50 jsing Exp $ */ +/* $OpenBSD: x_long.c,v 1.15 2019/04/15 17:46:02 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -195,8 +195,8 @@ long_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, } ltmp = (long)utmp; if (neg) { - ltmp++; ltmp = -ltmp; + ltmp--; } if (ltmp == it->size) { ASN1error(ASN1_R_INTEGER_TOO_LARGE_FOR_LONG); |