diff options
author | ptrcnull <git@ptrcnull.me> | 2022-02-20 17:05:42 +0100 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2022-02-21 08:26:20 +0000 |
commit | b576f0828443f2b729aefb8d2303ad75e9908c66 (patch) | |
tree | 284e68ed31a8998c74573cff54ddac2c5e24c852 | |
parent | 3ad4d6bed139272fd9a775165ed25ed45ffa24fb (diff) | |
download | apk-tools-b576f0828443f2b729aefb8d2303ad75e9908c66.tar.gz apk-tools-b576f0828443f2b729aefb8d2303ad75e9908c66.tar.bz2 apk-tools-b576f0828443f2b729aefb8d2303ad75e9908c66.tar.xz apk-tools-b576f0828443f2b729aefb8d2303ad75e9908c66.zip |
tar: allow for space as numeric field terminator
-rw-r--r-- | src/tar.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |