[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: segfault with 'ash -c type'
From:       Denis Vlasenko <vda.linux () googlemail ! com>
Date:       2007-06-25 19:33:20
Message-ID: 200706252133.20543.vda.linux () googlemail ! com
[Download RAW message or body]

On Monday 25 June 2007 12:44, Bernhard Fischer wrote:
> Hi,
> 
> consider:
> $ ./busybox ash -c type
> Segmentation fault
> 
> How about
> Index: shell/ash.c
> ===================================================================
> --- shell/ash.c (revision 18919)
> +++ shell/ash.c (working copy)
> @@ -6986,7 +6986,7 @@
>         int verbose = 1;
>  
>         /* type -p ... ? (we don't bother checking for 'p') */
> -       if (argv[1][0] == '-') {
> +       if (argv[1] && argv[1][0] == '-') {
>                 i++;
>                 verbose = 0;
>         }

Applied, thanks!
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic