mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-21 13:34:59 +02:00
Merge branch 'maint-0.2.7'
This commit is contained in:
commit
ee5337e904
3
changes/bug17722
Normal file
3
changes/bug17722
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Minor bugfixes (code correctness)
|
||||||
|
- Fix undefined behavior in the tor_cert_checksig function. Fixes bug
|
||||||
|
17722; bugfix on tor-0.2.7.2-alpha.
|
@ -206,7 +206,11 @@ tor_cert_checksig(tor_cert_t *cert,
|
|||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
cert->sig_ok = 1;
|
cert->sig_ok = 1;
|
||||||
memcpy(cert->signing_key.pubkey, checkable.pubkey->pubkey, 32);
|
/* Only copy the checkable public key when it is different from the signing
|
||||||
|
* key of the certificate to avoid undefined behavior. */
|
||||||
|
if (cert->signing_key.pubkey != checkable.pubkey->pubkey) {
|
||||||
|
memcpy(cert->signing_key.pubkey, checkable.pubkey->pubkey, 32);
|
||||||
|
}
|
||||||
cert->cert_valid = 1;
|
cert->cert_valid = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user