[Toybox] [PATCH] tar: fix heap buffer overrun.

enh enh at google.com
Tue Oct 13 14:19:21 PDT 2020


tar was assuming the old behavior of dirtree_path() where there was
always a spare byte free at the end. Since removing that seems to have
been an intentional change to dirtree_path(), change the caller to
resize the string itself.

Caught by ASan.
---
 toys/posix/tar.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tar-fix-heap-buffer-overrun.patch
Type: text/x-patch
Size: 1216 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20201013/654d73e7/attachment.bin>


More information about the Toybox mailing list