On Sat, 29 Aug 2026 16:53:07 +0100, Graeme Harker wrote:

> strlcpy() takes the full destination buffer size, including room for the
> NUL terminator, and copies at most size - 1 characters. The vendor,
> product and revision fields of struct blk_desc are declared
> char[BLK_*_SIZE + 1], so passing BLK_*_SIZE drops the last character of a
> maximum-length string.
> 
> This dates from the conversion of these copies from strncpy() to
> strlcpy(), which kept the size argument unchanged even though the two
> functions interpret it differently. The original was correct:
> 
> [...]

Applied to u-boot/next, thanks!

[1/1] ide: Fix truncation of device strings by one character
      commit: 0b4c421190a69dbd2b5d7b0990865c07c6fcb420
-- 
Tom


Reply via email to