Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Empty bootargs ....



> I've been trying to run the NetBSD kernel without using the boot.ppc
> loader (for me it is just easier :-).  In doing this, I wasn't passing
> any bootargs (oops).  Any way, I noticed the following:
> 
> o     In autoconf.c:setroot() there is an unsafe loop:
> 
>         for (cp = bootpath + strlen(bootpath); --cp >= bootpath;) {
> 
>       vs
> 
>         for (cp = bootpath + strlen(bootpath) + 1; --cp >= bootpath;) {

Hmm, arguably this isn't unsafe, as the boot code guarrantees that the
arguments are not empty.

> o     The size argument (r7?) should probably be passed into
>       the function machdep.c:initppc().  That function in turn
>       doing some sort of sanity check.

Again, the boot code guarrantees that the argument string is indeed one string,
so this isn't necessary either.

Ciao,
Wolfgang
--
ws%TooLs.DE@localhost     (Wolfgang Solfrank, TooLs GmbH)       +49-228-985800



Home | Main Index | Thread Index | Old Index