Skip to content

Commit bee5c6b

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

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

11431143
/* remove leading whitespace */
1144-
while (strchr8(" \t", *line)) {
1144+
while (linelen > 0 && strchr8(" \t", *line)) {
11451145
line++;
11461146
linelen--;
11471147
}

0 commit comments

Comments
 (0)