From d728f0f5f28c9c5347ac371373e3cd4cb350760f Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 8 Sep 2015 23:24:36 -0400 Subject: [PATCH] RT3993: Fix error found by VS2008 Cast and then negate, don't negate an unsigned. Signed-off-by: Rich Salz Reviewed-by: Tim Hudson --- crypto/asn1/a_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.25.1