sacc

sacc (saccomys): simple gopher client.
Log | Files | Refs | LICENSE

commit ad655e3c1be072eb6f0d1d61279028707c836a82
parent deb31cc5a1b686058273ec5e03d49564fee8e05b
Author: Quentin Rameau <quinq@fifth.space>
Date:   Sun, 10 Sep 2017 21:37:17 +0200

Fix buffer allocation calculation in gitrawitem()

Thanks to Hiltjo for reporting and testing the fix!

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

diff --git a/sacc.c b/sacc.c @@ -295,7 +295,7 @@ getrawitem(int sock) do { bs -= n; buf += n; - if (bs <= 1) { + if (bs < 1) { raw = xreallocarray(raw, ++bn, BUFSIZ); buf = raw + (bn-1) * BUFSIZ; bs = BUFSIZ;