From: David Woodhouse Date: Wed, 9 Sep 2015 03:24:36 +0000 (-0400) Subject: RT3993: Fix error found by VS2008 X-Git-Tag: OpenSSL_1_1_0-pre1~638 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=d728f0f5f28c9c5347ac371373e3cd4cb350760f RT3993: Fix error found by VS2008 Cast and then negate, don't negate an unsigned. Signed-off-by: Rich Salz Reviewed-by: Tim Hudson --- diff --git a/crypto/asn1/a_int.c b/crypto/asn1/a_int.c index 0d020e0c13..5d5e7f61c0 100644 --- a/crypto/asn1/a_int.c +++ b/crypto/asn1/a_int.c @@ -338,7 +338,7 @@ static int asn1_get_int64(int64_t *pr, const unsigned char *b, size_t blen, ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_SMALL); return 0; } - *pr = (int64_t)-r; + *pr = -(int64_t)r; } else { if (r > INT64_MAX) { ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_LARGE);