summaryrefslogtreecommitdiffstats
path: root/src/boot/efi/test-efi-string.c
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2023-10-15 11:32:32 +0200
committerJan Janssen <medhefgo@web.de>2023-10-15 17:41:25 +0200
commit5ce851ab991ecae805d42445de509652b9aadbd9 (patch)
tree3cf0cd3a3231ec64677f6aaee07724119107b637 /src/boot/efi/test-efi-string.c
parentboot: Move line_get_key_value to efi-string (diff)
downloadsystemd-5ce851ab991ecae805d42445de509652b9aadbd9.tar.xz
systemd-5ce851ab991ecae805d42445de509652b9aadbd9.zip
boot: Fix OOB reads in conf/osrel parsing
Diffstat (limited to '')
-rw-r--r--src/boot/efi/test-efi-string.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/boot/efi/test-efi-string.c b/src/boot/efi/test-efi-string.c
index f7964e0378..b71a0c3402 100644
--- a/src/boot/efi/test-efi-string.c
+++ b/src/boot/efi/test-efi-string.c
@@ -520,7 +520,9 @@ TEST(line_get_key_value) {
char *key, *value;
assert_se(!line_get_key_value((char[]){ "" }, "=", &pos, &key, &value));
+ assert_se(!line_get_key_value((char[]){ "\t" }, " \t", &pos, &key, &value));
+ pos = 0;
assert_se(line_get_key_value(s1, "=", &pos, &key, &value));
assert_se(streq8(key, "key"));
assert_se(streq8(value, "value"));