diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-04-18 10:33:55 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-04-18 10:33:55 +0200 |
commit | c705fb6e3bef59d6c4c36991030cb07ec22d07dc (patch) | |
tree | e004942e481f53cc4c3e1c144731fff9ddbbd5b6 /src/kex1.c | |
parent | 1a36aa21ba7ec4fb93120e1854c73d410810897c (diff) | |
download | libssh-c705fb6e3bef59d6c4c36991030cb07ec22d07dc.tar.gz libssh-c705fb6e3bef59d6c4c36991030cb07ec22d07dc.tar.xz libssh-c705fb6e3bef59d6c4c36991030cb07ec22d07dc.zip |
kex1: Add missing NULL check in make_rsa1_string()
CID 1388445
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/kex1.c')
-rw-r--r-- | src/kex1.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -51,6 +51,10 @@ static ssh_string make_rsa1_string(ssh_string e, ssh_string n){ ssh_string ret = NULL; buffer = ssh_buffer_new(); + if (buffer == NULL) { + goto error; + } + rsa = ssh_string_from_char("ssh-rsa1"); if (rsa == NULL) { goto error; |