Subject: Bug#1112: segfault on missing ssh-key

From: Antonio Russo <[email-masked]>
Date: Tue, 15 Nov 2016 08:31:31 -0500

Package: x2goclient
Version: 4.0.5.2

(though, presumably, all versions should be affected)

On line 1100 of src/sshmasterconnection.cpp, consider the line:

> ssh_private_key prkey=privatekey_from_file(my_ssh_session, keyName.toLatin1(), 0,"");

If keyName.toLatin1() is not an existing file, you'll get an invalid pointer free.

This might be a bug in libssh, but it took me an embarrassingly long time to figure
out what was wrong, so others might be similarly confused.

Thanks