The strtcpy function could overrun its output buffer. --- src/util.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/util.c b/src/util.c index b89a2b5..bbef995 100644 --- a/src/util.c +++ b/src/util.c @@ -262,7 +262,7 @@ char * strtcpy(char *dest, const char *src, size_t len) { char *d = dest; - while (len-- && *src != '\0') + while (--len && *src != '\0') *d++ = *src++; *d = '\0'; return dest;