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:
24bf6f3
)
Avoid signed overflow
author
Kurt Roeckx
<kurt@roeckx.be>
Thu, 23 Jun 2016 07:37:51 +0000
(09:37 +0200)
committer
Kurt Roeckx
<kurt@roeckx.be>
Fri, 24 Jun 2016 16:17:10 +0000
(18:17 +0200)
Found by afl
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR: #3013
crypto/asn1/x_long.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/x_long.c
b/crypto/asn1/x_long.c
index 9d27ba4bc1ff94c49164d399df8668287a05dbaa..0af78752018843bcdf780db623796be3b62ec934 100644
(file)
--- a/
crypto/asn1/x_long.c
+++ b/
crypto/asn1/x_long.c
@@
-128,8
+128,8
@@
static int long_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
}
ltmp = (long)utmp;
if (neg) {
- ltmp++;
ltmp = -ltmp;
+ ltmp--;
}
if (ltmp == it->size) {
ASN1err(ASN1_F_LONG_C2I, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG);