mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 18:28:10 +09:00
ed25519: fix leak in pki_ed25519_sign
Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
59da8dab50
commit
a6d412f0d7
@@ -59,9 +59,9 @@ int pki_ed25519_sign(const ssh_key privkey,
|
|||||||
const unsigned char *hash,
|
const unsigned char *hash,
|
||||||
size_t hlen)
|
size_t hlen)
|
||||||
{
|
{
|
||||||
uint8_t *buffer = malloc(hlen + ED25519_SIG_LEN);
|
|
||||||
unsigned long long dlen = 0;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
uint8_t *buffer;
|
||||||
|
unsigned long long dlen = 0;
|
||||||
|
|
||||||
buffer = malloc(hlen + ED25519_SIG_LEN);
|
buffer = malloc(hlen + ED25519_SIG_LEN);
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user