As noted in Issue #48 (see this comment), when building mlvwm with clang under OpenBSD amd64/7.5-stable, I get the following warnings:
mlvwm.c:386(mlvwm.o:(Done)): warning: strcpy() is almost always misused, please use strlcpy()
functions.c:322(functions.o:(ChangeDesk)): warning: sprintf() is often misused, please use snprintf()
There are quite a number of uses of strpy() in mlvwm.c's Done() implementation.
As noted in a comment on Issue #6, I had intended to replace strcat() with strlcat() as part of that move from sprintf() to snprintf(), but held off as strlcat() is generally BSD-specific and not included in Linux's libc. This is true of strlcpy() too.
I do intend to migrate to strlcpy() & strlcat() using libbsd, but I want to resolve existing issues building/running on Linux distros first, specifically: Arch Linux (Issue #40, Issue #37), Debian (Issue #38), Slackware (Issue #29), and Ubuntu (Issue #1).
As noted in Issue #48 (see this comment), when building
mlvwm
withclang
under OpenBSD amd64/7.5-stable, I get the following warnings:There are quite a number of uses of
strpy()
inmlvwm.c
'sDone()
implementation.As noted in a comment on Issue #6, I had intended to replace
strcat()
withstrlcat()
as part of that move fromsprintf()
tosnprintf()
, but held off asstrlcat()
is generally BSD-specific and not included in Linux's libc. This is true ofstrlcpy()
too.This is pretty well covered in WikiBook's C Programming/C Reference/nonstandard/strlcpy. Briefly,
strlcpy()
&strlcat()
are implemented for Linux in libbsd, but there may be some minor variations in implementation across other UNIX-like OSes.I do intend to migrate to
strlcpy()
&strlcat()
usinglibbsd
, but I want to resolve existing issues building/running on Linux distros first, specifically: Arch Linux (Issue #40, Issue #37), Debian (Issue #38), Slackware (Issue #29), and Ubuntu (Issue #1).