]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/efivars.c
efi: as extra paranoia NUL terminate UTF-16 strings with three NUL bytes
authorLennart Poettering <lennart@poettering.net>
Wed, 27 May 2020 14:22:07 +0000 (16:22 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 29 May 2020 13:41:18 +0000 (15:41 +0200)
commitc75e7da0b53dd67363b724502e91901e89097886
treee13ba1bca22de5032ef5c4b16078ca4fcec1d36e
parent9e5230aad9b9bde6bf228211832cd30d5d3d08d4
efi: as extra paranoia NUL terminate UTF-16 strings with three NUL bytes

This is a safey net anyway, let's make it fully safe: if the data ends
on an uneven byte, then we need to complete the UTF-16 codepoint first,
before adding the final NUL byte pair. Hence let's suffix with three
NULs, instead of just two.
src/basic/efivars.c