summaryrefslogtreecommitdiff
path: root/src/tar.c
AgeCommit message (Collapse)AuthorFilesLines
2022-02-21tar: allow for space as numeric field terminatorptrcnull1-1/+1
2021-08-24tar: include missing limits.hPaul Spooren1-0/+1
Without this header the build fails when used as a OpenWrt build dependency. Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-08-23remove IS_ERR_OR_NULLTimo Teräs1-1/+1
In most places where pointer can be an 'error' it cannot be null pointer. Further, in those cases just calling PTR_ERR() is not enough to handle the null case. Simplify code by removing this case. If NULL case needs to be handled, it's better to add separate check and return fixed error code in that case.
2021-08-23tar: improve compatibilityTimo Teräs1-20/+30
- check magic field for 'ustar' on read - harden get_octal to report errors on non-octal characters (e.g. GNU base256 encoding), fixes #10757 - fix mtime and size octal fields to not have zero terminator
2021-07-27Refactor .apk extraction codeTimo Teräs1-0/+317
This moves and isolates the tar code to tar.c. And the actual file extraction to disk is moved to extract.c. A new API is introduced and used for v2 file extraction. This essentially moves and isolates the apk_sign_ctx_* beast into extract_v2.c and offers a saner interface to handling packages. A place holder is added for v3 extraction.