RT3993: Fix error found by VS2008

Cast and then negate, don't negate an unsigned.

Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
David Woodhouse 2015-09-08 23:24:36 -04:00 committed by Rich Salz
parent 4d60c7e10f
commit d728f0f5f2

View File

@ -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);