tar: allow for space as numeric field terminator

cute-signatures
ptrcnull 2022-02-20 17:05:42 +01:00 committed by Timo Teräs
parent 3ad4d6bed1
commit b576f08284
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ static unsigned int get_octal(char *s, size_t l, int *r)
{
apk_blob_t b = APK_BLOB_PTR_LEN(s, l);
unsigned int val = apk_blob_pull_uint(&b, 8);
while (b.len >= 1 && b.ptr[0] == 0) b.ptr++, b.len--;
while (b.len >= 1 && (b.ptr[0] == 0 || b.ptr[0] == 0x20)) b.ptr++, b.len--;
if (b.len != 0) *r = -APKE_V2PKG_FORMAT;
return val;
}