Skip to content

Commit 99234b9

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

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
@@ -1145,7 +1145,7 @@ static char *line_get_key_value(
11451145
line[linelen] = '\0';
11461146

11471147
/* remove leading whitespace */
1148-
while (strchr8(" \t", *line)) {
1148+
while (linelen > 0 && strchr8(" \t", *line)) {
11491149
line++;
11501150
linelen--;
11511151
}

0 commit comments

Comments
 (0)