Repository: incubator-guacamole-server Updated Branches: refs/heads/master 0e5498fc8 -> 04205a9b9
GUACAMOLE-278: argc value received by 256-color SGR sequence parser must equal the number of remaining argv elements. 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/58e26eb3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/58e26eb3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/58e26eb3 Branch: refs/heads/master Commit: 58e26eb312f8a6c2c0d2fa99943f91bdd8f32a83 Parents: 0e5498f Author: Michael Jumper <[email protected]> Authored: Thu Apr 27 10:12:03 2017 -0700 Committer: Michael Jumper <[email protected]> Committed: Thu Apr 27 10:15:58 2017 -0700 ---------------------------------------------------------------------- src/terminal/terminal_handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/58e26eb3/src/terminal/terminal_handlers.c ---------------------------------------------------------------------- diff --git a/src/terminal/terminal_handlers.c b/src/terminal/terminal_handlers.c index afc64b9..55fd682 100644 --- a/src/terminal/terminal_handlers.c +++ b/src/terminal/terminal_handlers.c @@ -928,7 +928,7 @@ int guac_terminal_csi(guac_terminal* term, unsigned char c) { /* Attempt to set foreground with 256-color entry */ int xterm256_length = - guac_terminal_parse_xterm256(argc - 1, &argv[i + 1], + guac_terminal_parse_xterm256(argc - i - 1, &argv[i + 1], &term->current_attributes.foreground); /* If valid 256-color entry, foreground has been set */ @@ -959,7 +959,7 @@ int guac_terminal_csi(guac_terminal* term, unsigned char c) { /* 256-color background */ else if (value == 48) - i += guac_terminal_parse_xterm256(argc - 1, &argv[i + 1], + i += guac_terminal_parse_xterm256(argc - i - 1, &argv[i + 1], &term->current_attributes.background); /* Reset background */
