diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-03-14 07:50:04 +0100 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-04-11 14:01:51 +0300 |
commit | a4834e198d55d50a44d6f80e2137777b64652ce7 (patch) | |
tree | 45277e112567e04f1c37f311a3073b2b865c1835 /subsurface.debug | |
parent | f7b2355cedb75a8ed97644c05d57977f993cb08b (diff) | |
download | subsurface-a4834e198d55d50a44d6f80e2137777b64652ce7.tar.gz |
Cleanup: fix "unsave" snprintf()s in plannernotes.c
The planner notes were constructed using a sequence of
len += snprintf(buf, buflen - len, ...);
calls. This will fail once len > buflen, because the second parameter
of snprintf is unsigned. Note that snprintf returns the number of
bytes that would have been written if it weren't truncated.
Fix this by using membuffer with put_format()/put_string() and
asprintf_loc().
Fixes #1155.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'subsurface.debug')
0 files changed, 0 insertions, 0 deletions