mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-09 07:59:44 +00:00
Avoid creating an illegal pointer
Found by tis-interpreter Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1164
This commit is contained in:
parent
5000a6d121
commit
3892b95750
@ -396,10 +396,10 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in)
|
||||
len--;
|
||||
}
|
||||
|
||||
to = from + len - 1;
|
||||
to = from + len;
|
||||
|
||||
/* Ignore trailing spaces */
|
||||
while ((len > 0) && !(*to & 0x80) && isspace(*to)) {
|
||||
while ((len > 0) && !(to[-1] & 0x80) && isspace(to[-1])) {
|
||||
to--;
|
||||
len--;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user