This commit is contained in:
nhmall
2021-02-26 09:47:54 -05:00
parent 558b7c27d8
commit 2cf54f54ad

View File

@@ -1226,7 +1226,7 @@ nonconst(const char *str, char *buf, size_t bufsz)
char *retval = emptystr;
if (str && buf)
if (strlen(str) < (bufsz - 1)) {
if (strlen(str) <= (bufsz - 1)) {
Strcpy(buf, str);
retval = buf;
}