mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 11:37:44 +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:
parent
35e5024b7d
commit
a285e651f1
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ static size_t get_field_as_integral(const char (&field)[N])
|
||||||
{
|
{
|
||||||
size_t value = 0;
|
size_t value = 0;
|
||||||
for (size_t i = 0; i < N; ++i) {
|
for (size_t i = 0; i < N; ++i) {
|
||||||
if (field[i] == 0)
|
if (field[i] == 0 || field[i] == ' ')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
VERIFY(field[i] >= '0' && field[i] <= '7');
|
VERIFY(field[i] >= '0' && field[i] <= '7');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue