summaryrefslogtreecommitdiff
path: root/src/archive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive.c')
-rw-r--r--src/archive.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/archive.c b/src/archive.c
index 6681b61..7e5a926 100644
--- a/src/archive.c
+++ b/src/archive.c
@@ -44,7 +44,12 @@ struct tar_header {
char padding[12]; /* 500-512 */
};
-#define GET_OCTAL(s) apk_blob_uint(APK_BLOB_PTR_LEN(s, sizeof(s)), 8)
+#define GET_OCTAL(s) get_octal(s, sizeof(s))
+static int get_octal(char *s, size_t l)
+{
+ apk_blob_t b = APK_BLOB_PTR_LEN(s, l);
+ return apk_blob_parse_uint(&b, 8);
+}
struct apk_tar_entry_istream {
struct apk_istream is;