[BusyBox] Bug in pidof !

Vladimir N. Oleynik dzo at simtreas.ru
Mon Nov 25 04:15:03 UTC 2002


Steven,

> > I think there is a bug in the pidof applet in busybox-unstable-20021123
> > resulting in "Segmentation fault" when using pidof without "-s".
> 
> Shell we do something like:

Thanks. My fault. Patch attached.
 
> diff -p -u -r1.1.1.1 pidof.c
> --- procps/pidof.c      22 Oct 2002 12:21:13 -0000      1.1.1.1
> +++ procps/pidof.c      24 Nov 2002 14:43:01 -0000
> @@ -52,16 +52,16 @@ extern int pidof_main(int argc, char **a
> 
>         /* Looks like everything is set to go. */
>         while(optind < argc) {
> -               long* pidList;
> +               long* pidList, tmp;

;)
Is one of typical mistake. Your tmp is not pointer, only regular long.

 


--w
vodz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: last_patch67.gz
Type: application/x-gzip
Size: 588 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20021125/f022c203/attachment.bin 


More information about the busybox mailing list