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

Denys Vlasenko vda.linux at googlemail.com
Mon Jan 8 00:35:05 UTC 2018


applied, thanks!

On Fri, Jan 5, 2018 at 3:09 PM, Ingo van Lil <inguin at gmx.de> wrote:
> 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.
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>


More information about the busybox mailing list