mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibArchive: Accept space characters as terminators of tar numeric fields
POSIX specifies that each numeric field is terminated with one or more space or NUL characters.
This commit is contained in:
committed by
Linus Groh
parent
35e5024b7d
commit
a285e651f1
@@ -42,7 +42,7 @@ static size_t get_field_as_integral(const char (&field)[N])
|
||||
{
|
||||
size_t value = 0;
|
||||
for (size_t i = 0; i < N; ++i) {
|
||||
if (field[i] == 0)
|
||||
if (field[i] == 0 || field[i] == ' ')
|
||||
break;
|
||||
|
||||
VERIFY(field[i] >= '0' && field[i] <= '7');
|
||||
|
||||
Reference in New Issue
Block a user