Conversation

only a few places left to convert to pkgconf_buffer_t in pkgconf now :)

and then we will be able to stop using strlcpy/strlcat (which was a bad engineering decision, but i was also much younger then)

3
0
0

@ariadne out of curiosity is that a you shouldn't use strlcpy/cat generally or it's just bad in your particular case

1
0
0

@pius strlcpy/strlcat improve upon the memory safety of strncpy/strncat, but are almost always the wrong answer to a problem.

2
0
0

@pius the correct approach is to use pascal-style strings, where the length is tracked

1
0
0
@ariadne @pius I was reading the string_copying(7) man page to remind me of what the different string copying functions do, and apparently it recommends using strtcpy and stpecpy instead of strlcpy and strlcat, both of which appear to have just been made up by the authors of that man page since it also says "This function is not provided by any library; see EXAMPLES for a reference implementation."
1
1
1
are there any other cases of linux man pages documenting non-existent functions that are not provided by any library and exist only as implementations provided in the man page itself, or is this the only one?

RE: https://berkeley.edu.pl/objects/ccc44049-4f9f-46a6-8ae3-0f98cdf024bb
0
0
0

update: pkgconf no longer has any strlcpy/strlcat

1
0
0

@ariadne genuinely interested: what's wrong with strlcpy and strlcat?

1
0
0

@rnd silent truncation, but that isn't a practical concern in pkgconf I guess.

0
0
0