[Top][All Lists]

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

Re: Preview: portable dumper

From: Daniel Colascione
Subject: Re: Preview: portable dumper
Date: Mon, 19 Feb 2018 12:31:15 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 02/19/2018 12:18 PM, Eli Zaretskii wrote:
From: Andy Moreton <address@hidden>
Date: Mon, 19 Feb 2018 20:03:09 +0000

     int sys_read(int fd, char *buffer, unsigned int count);

The limit for a chunk should be INT_MAX (not UINT_MAX) so that it
is representable in the (signed) return value.

We should be able to change sys_read to return ssize_t instead.  Can
you try that?

I looked at the w32 code --- we give the size to _read directly in the non-pipe, non-socket, non-serial case, and MSDN doesn't say what happens when size > INT_MAX, so in the interest of being rather safe than sorry, I just changed the pdumper code to use INT_MAX. It shouldn't matter in practice.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]