diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-06-19 12:06:43 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-06-19 12:06:43 +0200 |
commit | b698f6361ce294d275463d10df5f6613e84df380 (patch) | |
tree | d63618d989959aa01697e6ef8703a2d9fcf63914 | |
parent | e6be005236dfbafbe469c6630b750c2d987ba738 (diff) | |
download | libssh-b698f6361ce294d275463d10df5f6613e84df380.tar.gz libssh-b698f6361ce294d275463d10df5f6613e84df380.tar.xz libssh-b698f6361ce294d275463d10df5f6613e84df380.zip |
kex1: Fix a possible null pointer dereference.
-rw-r--r-- | src/kex1.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -47,6 +47,9 @@ static ssh_string make_rsa1_string(ssh_string e, ssh_string n){ buffer = ssh_buffer_new(); rsa = ssh_string_from_char("ssh-rsa1"); + if (rsa == NULL) { + goto error; + } if (buffer_add_ssh_string(buffer, rsa) < 0) { goto error; |