misc: Implement grub_strlcpy()
authorB Horn <b@horn.uk>
Sat, 15 Jun 2024 01:33:08 +0000 (02:33 +0100)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commit9306082f37592f4a2872fddaef773d78a5ffb34c
treec01785452396c6807edd10e11d0b20ca12410628
parent13b90e5ea54e58a1ad7b8e96c67afd304752aafe
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