[PATCH] ash: fail if 'shift' operand is out of range

Ingo van Lil inguin at gmx.de
Fri Jan 5 14:09:42 UTC 2018


Package: busybox
Version: v1.29.0.git
Severity: minor

If the numeric argument passed to ash's 'shift' built-in is greater than 
'$#' the command performs no operation and exits successfully. It should 
return a non-zero exit code instead:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#shift

This is consistent with bash and hush.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ash-fail-if-shift-operand-is-out-of-range.patch
Type: text/x-patch
Size: 1035 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20180105/a41adba4/attachment.bin>


More information about the busybox mailing list