geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit 60b382884e98afcc7e8dc4b679094ef2a1c652fa
parent 96c7692574c9f7edf5faf5c98cafb8473b0fc1ce
Author: Christoph Lohmann <20h@r-36.net>
Date:   Thu, 10 Aug 2023 11:51:56 +0200

Add big comment why we need strlcat everywhere.

Diffstat:
Mmain.c | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -356,6 +356,17 @@ dothegopher: } return; } + /* + * The size check for strcat to work is + * above. + * + * Until strlcat isn't properly in all + * linux libcs, we keep to this. OpenBSD + * will complain about strcat and + * smart-ass gcc will cmplain about + * strncat of one char static char array + * is an overflow. + */ if (rpath[len-1] != '/') strcat(rpath, "/"); strcat(rpath, indexf[i]);