From 951cfa3881107b81263fee0f2342d9a2d49c5bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 18 Feb 2016 16:12:46 +0100 Subject: vis: fix possible undefined zero allocation --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index fb77b67..a7fc234 100644 --- a/main.c +++ b/main.c @@ -1211,7 +1211,7 @@ static const char *cursors_align_indent(Vis *vis, const char *keys, const Arg *a } size_t len = maxcol - mincol; - char *buf = malloc(len); + char *buf = malloc(len+1); if (!buf) return keys; memset(buf, ' ', len); -- cgit v1.2.3