Skip to content

Use strlcpy in place where strncpy(s, ...) + s[sizeof(s)-1] = \0; was used

Ondřej Surý requested to merge ondrej/use-strlcpy-in-wks_11.c into master

The code triggered -Werror=stringop-truncation in gcc 8 UBSAN, but it was correct. It's just better and cleaner to use strlcpy here, and it wouldn't happen in Finland, they rake they strncpy usage there...

Edited by Ondřej Surý

Merge request reports