[Toybox] [PATCH] dirtree_path: always honor size request.

2020-10-14 Thread enh via Toybox
tar asks dirtree_path() to reserve space for a trailing '/', but recent changes broke that for the case that was resolving to just a strdup(). Caught by `export ASAN=1` and `make test_tar`. --- lib/dirtree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) From

[Toybox] hwclock & rtcwake expect /etc/adjtime to exist

2020-10-14 Thread Patrick Oppenlander
Hi, A colleague of mine noticed that after a recent toybox update hwclock now expects /etc/adjtime to be present. Previously it used to assume UTC if /etc/adjtime is not present which is consistent with util-linux. I've attached patches which address this issue in hwclock and rtcwake. Regards,

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

2020-10-14 Thread enh via Toybox
On Wed, Oct 14, 2020 at 1:56 AM Rob Landley wrote: > > On 10/13/20 4:19 PM, enh via Toybox wrote: > > tar was assuming the old behavior of dirtree_path() where there was > > always a spare byte free at the end. > > It's not the old behavior, tar.c is doing: > > i = 1; > name = hname =

[Toybox] [PATCH] stty: don't mangle c_iflags.

2020-10-14 Thread enh via Toybox
Fixes https://github.com/landley/toybox/issues/251 where `stty 300` was mangling c_iflags to 0x300 because even if we don't match a full hex specification of struct termios, sscanf() will have overwritten the first value, which is c_iflag. --- toys/pending/stty.c | 10 +++--- 1 file changed,

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

2020-10-14 Thread Rob Landley
On 10/13/20 4:19 PM, enh via Toybox wrote: > tar was assuming the old behavior of dirtree_path() where there was > always a spare byte free at the end. It's not the old behavior, tar.c is doing: i = 1; name = hname = dirtree_path(node, ); ... // Consume the 1 extra byte alocated in