Age | Commit message (Collapse) | Author |
|
When passed an empty string, glibc's basename() returns a pointer to the
string "." in read-only memory. If an empty suffix is given, it fits
the condition of being shorter than the path, so we try to overwrite the
null byte and crash. Fix this by just ignoring empty suffixes; they
don't do anything anyway.
|
|
I'm not an od user myself, but I copy & pasted an 'od' invocation from a bug
and it didn't work. Which was embarrassing because I'd just claimed that the
od user didn't need to run od on their desktop (as they had done) and could
have run it on the device instead...
|
|
Replaced by toybox ulimit -p.
|
|
effect of "sed -e 'a\'" with no trailing line). But there's an actual user,
and it's not hard to implement, and it's not hard to implement, and there
isn't an obvious _other_ way to do it, so add the behavior and a test for it.
Fix some bad/missing comments while I was there, and add a couple TODOs.
|
|
instead, move tests/blkid into tests/files/blkid.
|
|
|
|
off the start of the string. I pulled on the thread...)
|
|
Toybox single binaries are now made directly with the new name instead of
stomping toybox and getting renamed.
Unstripped files now live in generated/unstripped.
Target to run all tests is now "make tests" to avoid conflict with "make test".
.singleconfig now has .PHONY: entries for all test_$NAME targets.
Default install location changed to /usr/toybox, code.html now says how
to change it (set $PREFIX).
scripts/install.sh --uninstall works now. (And you get to keep the pieces!)
|
|
vfat labels have a fixed space allocated for them. In the case of a
shorter label, the remaining bytes are padded with spaces. A vfat
filesystem with no label (i.e. that will show up in Windows as "Local
Disk (X:)" or "Removable Disk (X:)") is stored as "NO NAME ".
Both of these changes match behavior from util-linux.
|
|
Fix memory leaks in regex. Simplify regex check (if we matched, subexpression
had to match). Don't exit() from a command, set exitval and return.
|
|
I deliberately didn't do this first time round because for me our lsof
is already 10x faster than traditional lsof, and caching means we potentially
give less information about a socket that's created while we're running.
It turns out that traditional lsof caches anyway, so I guess nobody cares.
This also fixes a mistake where lsof used CFG_FREE instead of CFG_TOYBOX_FREE.
|
|
|
|
TT.file_no was being incorrectly calculated as 0 when tail -f was passed
a single argument.
|
|
|
|
|
|
The tests/*.test files shouldn't explicitly exit, because they are
sourced in scripts/test.sh. No tests after sed were being run.
|
|
copying itinto a second variable. Also add error message for empty ( )
|
|
eliminate syntax_error() function (just call error_exit() directly),
eliminate advance() wrapper, pipe expected error messages in test to /dev/null
|
|
All tests pass now; this fixes the 2 remaining failures, including a
segfault.
The structure of the code has changed a lot -- instead of having a tiny
function per operator, we have eval_op() which does common type coercion
and then evaluates the operator. I tried writing it a couple different
ways, and this was the cleanest.
The OPS table now contains the operator string, precedence level,
signature for type coercion, and operator ID.
|
|
expr now uses the precedence table specified by POSIX, implemented using
the "precedence climbing" algorithm. See the references at the top of
eval_expr().
This fixes 3 of 4 failing tests.
I also added more tests for correct behavior and for syntax errors.
This includes a new test exposing a segfault, related to type coercion.
|
|
|
|
|
|
|
|
numbers even though we use unsigned math now.
|
|
|
|
header unconditionally. (This fixes the warning when CP_PRESERVE disabled.)
|
|
Found by afl-fuzz.
|
|
(This should fix allyesconfig.)
|
|
handle infinite depth. Fix docs, tweak dirtree_handle_callback() semantics,
remove dirtree_start() and don't export dirtree_handle_callback(), instead
offer dirtree_flagread(). (dirtree_read() is a wrapper around dirtree_flagread
passing 0 for flags.)
|
|
|
|
- shorten error messages
- replace mk_rq with sprintf
- remove struct and defines
- change unsigned int to unsigned
|
|
next few fields in the order the other implementation outputs, fewer commas,
fix a big where big endian executable type wasn't detected right,
and fix the filehandle leak.
|
|
accept that as input. (And that I screwed up the test.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
major/minor/makedev, but glibc has vowed to break existing programs
(https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html)
and replace it with _another_ non-standard header (not in posix or lsb),
so let's just add functions to lib/ that do the transform ourselves.
|
|
|
|
3.8 kernel in 2012. That's way too new to assume the build environment has
it, so #ifdef and simulate a failure if it's not there.
|
|
Based on suggestions from Nicholas Boichat.
|
|
|