Skip to content

Commit 8626142

Browse files
medhefgobluca
authored andcommitted
boot: Fix OOB reads in conf/osrel parsing
(cherry picked from commit 5ce851a) (cherry picked from commit 99234b9)
1 parent a052d11 commit 8626142

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/boot/efi/boot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ static char *line_get_key_value(
11541154
line[linelen] = '\0';
11551155

11561156
/* remove leading whitespace */
1157-
while (strchr8(" \t", *line)) {
1157+
while (linelen > 0 && strchr8(" \t", *line)) {
11581158
line++;
11591159
linelen--;
11601160
}

0 commit comments

Comments
 (0)