From 03d9c51b5d3e15cac7148e8cc733af7ae8c9f6cc Mon Sep 17 00:00:00 2001 From: Jim Chen Date: Wed, 16 May 2018 00:11:30 -0400 Subject: [PATCH] GUACAMOLE-470: Fix crash when X11 color is not found. Fix a crash when an X11 color name is not found. The variable to null-check should be `found`, not `color`. --- src/terminal/named-colors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal/named-colors.c b/src/terminal/named-colors.c index 89deee8b..b0e579b6 100644 --- a/src/terminal/named-colors.c +++ b/src/terminal/named-colors.c @@ -786,7 +786,7 @@ int guac_terminal_find_color(const char* name, guac_terminal_color* color) { guac_terminal_named_color_search); /* Fail if no such color is found */ - if (color == NULL) + if (found == NULL) return 1; /* Otherwise copy the found color */