Repository: incubator-guacamole-server Updated Branches: refs/heads/master a75bca1e9 -> 2c12c1285
GUACAMOLE-424: Fix null pointer dereference for vnc client display Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/15f6c4f3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/15f6c4f3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/15f6c4f3 Branch: refs/heads/master Commit: 15f6c4f3dc51c68e0f869fb13c75c79bd2f0a4db Parents: 95be88b Author: itsankoff <[email protected]> Authored: Tue Oct 24 20:21:03 2017 +0300 Committer: itsankoff <[email protected]> Committed: Tue Oct 24 20:21:03 2017 +0300 ---------------------------------------------------------------------- src/protocols/vnc/user.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/15f6c4f3/src/protocols/vnc/user.c ---------------------------------------------------------------------- diff --git a/src/protocols/vnc/user.c b/src/protocols/vnc/user.c index 7e12373..b036785 100644 --- a/src/protocols/vnc/user.c +++ b/src/protocols/vnc/user.c @@ -112,8 +112,10 @@ int guac_vnc_user_leave_handler(guac_user* user) { guac_vnc_client* vnc_client = (guac_vnc_client*) user->client->data; - /* Update shared cursor state */ - guac_common_cursor_remove_user(vnc_client->display->cursor, user); + if (vnc_client && vnc_client->display && vnc_client->display->cursor) { + /* Update shared cursor state */ + guac_common_cursor_remove_user(vnc_client->display->cursor, user); + } /* Free settings if not owner (owner settings will be freed with client) */ if (!user->owner) {
