From: Jonas Fonseca Date: Sun, 15 Feb 2009 17:10:05 +0000 (+0100) Subject: Fix bug in draw_space to not access memory outside the space buffer X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7a6f2dd185946eaaa38373c92667631edecd76ab;p=tig.git Fix bug in draw_space to not access memory outside the space buffer --- diff --git a/tig.c b/tig.c index 148b6b6..725ace0 100644 --- a/tig.c +++ b/tig.c @@ -1905,7 +1905,7 @@ draw_space(struct view *view, enum line_type type, int max, int spaces) while (spaces > 0) { int len = MIN(spaces, sizeof(space) - 1); - col += draw_chars(view, type, space, spaces, FALSE); + col += draw_chars(view, type, space, len, FALSE); spaces -= len; }