From c705fb6e3bef59d6c4c36991030cb07ec22d07dc Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 18 Apr 2018 10:33:55 +0200 Subject: [PATCH] kex1: Add missing NULL check in make_rsa1_string() CID 1388445 Signed-off-by: Andreas Schneider --- src/kex1.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kex1.c b/src/kex1.c index 328ed7f1..397b3d2f 100644 --- a/src/kex1.c +++ b/src/kex1.c @@ -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;