projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d60c7e
)
RT3993: Fix error found by VS2008
author
David Woodhouse
<David.Woodhouse@intel.com>
Wed, 9 Sep 2015 03:24:36 +0000
(23:24 -0400)
committer
Rich Salz
<rsalz@openssl.org>
Wed, 9 Sep 2015 03:32:53 +0000
(23:32 -0400)
Cast and then negate, don't negate an unsigned.
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/asn1/a_int.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/a_int.c
b/crypto/asn1/a_int.c
index 0d020e0c13031b440588e6a304685c61693bffc5..5d5e7f61c0d7cdf9bffd476d3797acdaefd1bdc3 100644
(file)
--- 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);