Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140630065808.GF179@brightrain.aerifal.cx>
Date: Mon, 30 Jun 2014 02:58:08 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Re: cups debugging, continued...ugly patch

On Mon, Jun 30, 2014 at 08:21:10AM +0200, Luca Barbato wrote:
> On 30/06/14 07:34, Isaac Dunham wrote:
> > Thanks to Rich's comment, I've found a solution that works here.
> > The patch doesn't exactly look nice, though.
> 
> Shouldn't bind check that the size is at least the one needed and by
> happy even if the size is larger than expected?

No, that's not how it works. POSIX permits but does not require the
error in this case:

    The bind() function may fail if:

    [EINVAL]

        The address_len argument is not a valid length for the address
        family.

I think the idea is that, if you pass the wrong length, there's
likely something seriously wrong going on. Which can easily happen
with all the bogus pseudo-polymorphism of struct sockaddr...

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.