noice

small file browser
git clone git://git.2f30.org/noice
Log | Files | Refs | README | LICENSE

commit d55b1646ee85abf6034e8fdfc9e4a01cc3022a53
parent c54f2b663b707fa5f5fa4c1a58bf606d9f132869
Author: sin <sin@2f30.org>
Date:   Sun,  4 Aug 2019 12:51:33 +0100

Fix dprintf()

Diffstat:
Mdprintf.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dprintf.c b/dprintf.c @@ -14,7 +14,7 @@ dprintf(int fd, const char *fmt, ...) va_start(ap, fmt); r = vsnprintf(buf, sizeof(buf), fmt, ap); - if (r > 0) + if (r > 0 && r < sizeof(buf)) write(fd, buf, r); va_end(ap); return r;