07ab1af55c
We're not even zeroing the last byte after this call. This was a completely gratuitous truncation of one byte, and the resulting character array still wasn't guaranteed to be null terminated, because strncpy(3) can't do that. Just to clarify, none of these structures needed zeroing, as they are treated as null-padded fixed-size character arrays. Calling strncpy(3) was actually the correct call, and the only problem was unnecessarily truncating strings by one byte more than necessary. Cc: Matthew House <mattlloydhouse@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2.2 KiB
2.2 KiB