aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-02-18 16:12:46 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-02-18 16:50:37 +0100
commit951cfa3881107b81263fee0f2342d9a2d49c5bee (patch)
tree70c06733a42f1813cacdc1e8d2ecb47867228f24 /main.c
parentfe6949b78eda2703ed91f98053f66e428fdeb9c1 (diff)
downloadvis-951cfa3881107b81263fee0f2342d9a2d49c5bee.tar.gz
vis-951cfa3881107b81263fee0f2342d9a2d49c5bee.tar.xz
vis: fix possible undefined zero allocation
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
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);