Re: init in busybox (Re: odd -- /var/log/messages and tail in tty3 not working)
On Mon Jan 24, 2000 at 12:20:30PM +0900, Taketoshi Sano wrote:
>
> BTW, I think another fix should be applied to init.c in busybox.
>
> --- ../../../../../cvs/boot-floppies/utilities/busybox/init.c Sat Jan 22 20:00:32 2000
> +++ ./init.c Sat Jan 22 20:45:24 2000
> @@ -621,8 +621,12 @@
> {
> initAction *a, *b=NULL;
> for( a=initActionList ; a; b=a, a=a->nextPtr) {
> - if (a == action && b != NULL) {
> + if (a == action) {
> + if (b != NULL) {
> b->nextPtr=a->nextPtr;
> + } else {
> + initActionList=a->nextPtr;
> + }
> free( a);
> break;
> }
Yikes! You are absolutely correct -- init could
potentially have referenced a free pointer.
Good Spotting! I have applied your fix to CVS,
-Erik
--
Erik B. Andersen Web: http://www.xmission.com/~andersen/
email: andersee@debian.org
--This message was written using 73% post-consumer electrons--
Reply to: