mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
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:
parent
4d60c7e10f
commit
d728f0f5f2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user