diff options
author | ptrcnull <git@ptrcnull.me> | 2022-02-20 17:05:42 +0100 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2022-02-24 14:35:54 +0200 |
commit | cfe72c6fc4770c0bfba48660d88c65f0f923e479 (patch) | |
tree | 51e3bd0dced158a2a9e38ee7a67969bf82947bc3 /src | |
parent | 2c68ee3873e4f53512f562aa0c4f144a785c2fa6 (diff) | |
download | apk-tools-cfe72c6fc4770c0bfba48660d88c65f0f923e479.tar.gz apk-tools-cfe72c6fc4770c0bfba48660d88c65f0f923e479.tar.bz2 apk-tools-cfe72c6fc4770c0bfba48660d88c65f0f923e479.tar.xz apk-tools-cfe72c6fc4770c0bfba48660d88c65f0f923e479.zip |
tar: allow for space as numeric field terminator
Diffstat (limited to 'src')
-rw-r--r-- | src/io_archive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io_archive.c b/src/io_archive.c index 54a2106..3ada751 100644 --- a/src/io_archive.c +++ b/src/io_archive.c @@ -57,7 +57,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 = -EAPKFORMAT; return val; } |