mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Do not leak the 'tag' when trying to read a truncated ed25519 key file
Fix for bug 18956.
This commit is contained in:
parent
5b91e70a4f
commit
ec81329339
5
changes/bug18956
Normal file
5
changes/bug18956
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
o Minor bugfixes (memory leaks):
|
||||||
|
- Fix a small, uncommon memory leak that could occur when reading a
|
||||||
|
truncated ed25519 key file. Fixes bug 18956; bugfix on 0.2.6.1-alpha.
|
||||||
|
|
||||||
|
|
@ -433,6 +433,7 @@ ed25519_seckey_read_from_file(ed25519_secret_key_t *seckey_out,
|
|||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tor_free(*tag_out);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,6 +473,7 @@ ed25519_pubkey_read_from_file(ed25519_public_key_t *pubkey_out,
|
|||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tor_free(*tag_out);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user