direwolf
direwolf copied to clipboard
Use proper buffer size in tt_user.c's digit_suffix
Modern Ubuntu (e.g. GitHub Actions' ubuntu-latest), among other distros, compiles with -D_FORTIFY_SOURCE=3 which does neat things like checking strlcpy won't overflow.
tt_user_s has a char digit_suffix[3+1], so when attempting to strlcpy into it with length 5, this triggers a buffer overflow error for safety reasons (even though the source string only has length 4)
Let's instead pass a size to digit_suffix and use that.
Note that this was found by running the test in tt_user.c - I think it would probably be good if this were run automatically