From 7a6f2dd185946eaaa38373c92667631edecd76ab Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sun, 15 Feb 2009 18:10:05 +0100 Subject: [PATCH] Fix bug in draw_space to not access memory outside the space buffer --- tig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2