kex1: Add missing NULL check in make_rsa1_string()

CID 1388445

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-04-18 10:33:55 +02:00
parent 1a36aa21ba
commit c705fb6e3b

View File

@@ -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;