[Toybox] [PATCH] tar: fix base-256 output.

enh enh at google.com
Mon Mar 8 09:57:03 PST 2021


A tar file created by toybox tar with values large enough to need
base-256 rather than ASCII octal caused a tar reader to crash, and
caused GNU tar to complain.

I note from the docs at
https://github.com/libarchive/libarchive/blob/master/libarchive/tar.5#L326
that they imply that only the top *bit* should be set to indicate this
format, not the whole top byte, to give a 95-bit or 63-bit field. But I
don't think we can hit that in practice?

Bug: http://b/181683612
---
 tests/tar.test   |  5 +++++
 toys/posix/tar.c | 17 ++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210308/a758790f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tar-fix-base-256-output.patch
Type: text/x-patch
Size: 2992 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210308/a758790f/attachment-0002.bin>


More information about the Toybox mailing list