]> dgit.raspbian.org Git - grub2.git/commit
misc: Implement grub_strlcpy()
authorB Horn <b@horn.uk>
Sat, 15 Jun 2024 01:33:08 +0000 (02:33 +0100)
committerAurelien Jarno <aurel32@debian.org>
Thu, 30 Apr 2026 19:02:01 +0000 (21:02 +0200)
commitb255ebaf0d1da9bba9e5cd6510c74afaedfc7043
tree6cd626077564f9f8dce8a146053f4f38e060898e
parent8f7d0173ca03ccf822fb530926ab0841d3d8147d
misc: Implement grub_strlcpy()

grub_strlcpy() acts the same way as strlcpy() does on most *NIX,
returning the length of src and ensuring dest is always NUL
terminated except when size is 0.

Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name misc-Implement-grub_strlcpy.patch
include/grub/misc.h