aboutsummaryrefslogtreecommitdiffstats
path: root/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'env.c')
-rw-r--r--env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/env.c b/env.c
index 2ac5a622..5dd54032 100644
--- a/env.c
+++ b/env.c
@@ -290,7 +290,7 @@ char *visbuf(const char *buf)
needed = strlen(buf) * 5 + 1; /* worst case: HEX, plus NUL byte */
- if (needed > vbufs) {
+ if (!vbuf || needed > vbufs) {
vbufs = needed;
vbuf = (char *)xrealloc(vbuf, vbufs);
}