Current-Users archive

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

Re: Problems with packages on a netbsd-6 sparc



At Fri, 18 May 2012 16:28:33 -0400, Chris Ross 
<cross+netbsd%distal.com@localhost> wrote:
Subject: Re: Problems with packages on a netbsd-6 sparc
> 
> 
> On May 18, 2012, at 4:13 PM, Greg A. Woods wrote:
> > If I'm not mistaken the "cp" pointer above, at the line where it is
> > assigned to "newpw" prior to the patch, is unchanged from the value it
> > had when it was most recently assigned from the return value of a
> > malloc() call.
> 
> You are mistaken.  cp was the result of malloc() result being
> incremented by the sizeof a struct.

The original code I have says:

    if ((cp = malloc(total)) == NULL)
            return(NULL);
    newpw = (struct passwd *) cp;

I see in the current pkgsrc patches though that this is no longer true.

In other words I guess the code got even more broken since then.  :-)

-- 
                                                Greg A. Woods
                                                Planix, Inc.

<woods%planix.com@localhost>       +1 250 762-7675        http://www.planix.com/

Attachment: pgpPDMSihez9w.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index