diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-02-18 16:12:46 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-02-18 16:50:37 +0100 |
| commit | 951cfa3881107b81263fee0f2342d9a2d49c5bee (patch) | |
| tree | 70c06733a42f1813cacdc1e8d2ecb47867228f24 | |
| parent | fe6949b78eda2703ed91f98053f66e428fdeb9c1 (diff) | |
| download | vis-951cfa3881107b81263fee0f2342d9a2d49c5bee.tar.gz vis-951cfa3881107b81263fee0f2342d9a2d49c5bee.tar.xz | |
vis: fix possible undefined zero allocation
| -rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |
