diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-11-01 19:15:17 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-11-01 19:17:06 +0200 |
commit | 36d5b91495e22fe8425277f2d793fd4a284ee2b6 (patch) | |
tree | d6b9bea1ef1d4ab8ed1374c193a3c85b5968bfea /src/blob.c | |
parent | bb1ac2557deb006fd2d6c1554cee329b5f0e44ba (diff) | |
download | apk-tools-36d5b91495e22fe8425277f2d793fd4a284ee2b6.tar.gz apk-tools-36d5b91495e22fe8425277f2d793fd4a284ee2b6.tar.bz2 apk-tools-36d5b91495e22fe8425277f2d793fd4a284ee2b6.tar.xz apk-tools-36d5b91495e22fe8425277f2d793fd4a284ee2b6.zip |
support extended pax header in tar extractor
Diffstat (limited to 'src/blob.c')
-rw-r--r-- | src/blob.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -492,6 +492,15 @@ err: *b = APK_BLOB_NULL; } +int apk_blob_pull_blob_match(apk_blob_t *b, apk_blob_t match) +{ + if (b->len < match.len) return 0; + if (memcmp(b->ptr, match.ptr, match.len) != 0) return 0; + b->ptr += match.len; + b->len -= match.len; + return 1; +} + static unsigned char b64decode[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |