summaryrefslogtreecommitdiffstats
path: root/diag.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-01-31 23:17:23 -0500
committerTavian Barnes <tavianator@tavianator.com>2019-01-31 23:17:23 -0500
commitdbf435f4555ee3a1f2f7c929866f63dc5a48662b (patch)
tree2a3fac8951868794a50f6a07ab9e0d8f309869e9 /diag.c
parent2d3b03183c9f1cdb685977f349bf4bbc74a2038d (diff)
downloadbfs-dbf435f4555ee3a1f2f7c929866f63dc5a48662b.tar.xz
dstring: Initialize freshly-allocated strings
Previously, a string allocated with dstralloc() had length 0 but no terminating NUL byte there. This was problematic if such a string was used without being modified. In particular, this was reproducible with bfs -ok by not typing any response to the prompt. In that case, uninitialized memory was being tested for a y/n response, with unpredictable results.
Diffstat (limited to 'diag.c')
0 files changed, 0 insertions, 0 deletions