[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: ws2_32: Include inttypes.h for UINT32_MAX.
From:       Jacek Caban <jacek () codeweavers ! com>
Date:       2015-04-29 14:20:50
Message-ID: 5540E8C2.1020209 () codeweavers ! com
[Download RAW message or body]

On 04/29/15 15:50, Bruno Jesus wrote:
> On Wed, Apr 29, 2015 at 10:44 AM, Jacek Caban <jacek@codeweavers.com> wrote:
>> When setting the timeout, the value may be rounded. If it's rounded up
>> from 0xffffffff, the value will not fit in 32-bit unsigned type. It's
>> not theoretical, I've seen this happening.
> Hi, Jacek. Thanks for the reply, so why can't we take care of the
> overflow inside the helper function and still return an ULONG to
> callers?

Its callers accept different types. getsockopt uses unsigned type, so it
may handle all values up to 0xffffffff. In case of sendto and recv_base,
we need to pass it to poll, which accepts signed types. That's why I
left handling overflows to callers.

Jacek


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic