diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2015-09-08 23:24:36 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-09-08 23:32:53 -0400 |
commit | d728f0f5f28c9c5347ac371373e3cd4cb350760f (patch) | |
tree | 133758356b5096969b4a366f49b273ef6ed26fc6 /crypto/asn1 | |
parent | 4d60c7e10f1d7ebe34842f96e13b64db7fc2dc1b (diff) |
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>
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/a_int.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |