]> git.ipfire.org Git - thirdparty/systemd.git/commit
efivars: fix size checks in efi_get_variable()
authorLennart Poettering <lennart@poettering.net>
Thu, 13 Nov 2025 11:14:34 +0000 (12:14 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 13 Nov 2025 13:19:29 +0000 (14:19 +0100)
commitab69a04600fd34c152c44be6864eb3bc64568e17
tree83ec5fa0356edd9768329a60c3397db039d99648
parent88e26303ce922bb20327e62cd8fbfa3c997384cd
efivars: fix size checks in efi_get_variable()

writev() returns the full size, not just the payload size, hence always
add sizeof(attr) where necessary.

Let's also change a couple of "4" into sizeof(attr) all over the place,
to make clear what they are about.

Fixes: #39695
Follow-up for: 9db9d6806e398465a6366dfc5bdde2e24338ac29
src/basic/efivars.c