[PATCH] xargs: make -I imply -r

Denys Vlasenko vda.linux at googlemail.com
Sat Oct 24 20:01:59 UTC 2015


Applied, thanks

On Sat, Oct 17, 2015 at 9:37 PM, Aaro Koskinen <aaro.koskinen at iki.fi> wrote:
> Make -I imply -r (GNU findutils seems to do the same).
>
> Fixes the following bug:
>
>         $ echo -n | xargs -I% echo %
>         Segmentation fault
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen at iki.fi>
> ---
>  findutils/xargs.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/findutils/xargs.c b/findutils/xargs.c
> index 5870b8a..e22e986 100644
> --- a/findutils/xargs.c
> +++ b/findutils/xargs.c
> @@ -577,6 +577,7 @@ int xargs_main(int argc, char **argv)
>                 G.argv = argv;
>                 argc = 0;
>                 read_args = process_stdin_with_replace;
> +               opt |= OPT_NO_EMPTY;
>         } else
>  #endif
>         {
> --
> 2.4.0
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list