From: Daniel Colascione Date: Mon, 19 Feb 2018 20:28:43 +0000 (-0800) Subject: Use INT_MAX, not UINT_MAX, as limit for read() X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=229859935f3c776bfa51b91c05302e8d124177d1;p=emacs.git Use INT_MAX, not UINT_MAX, as limit for read() --- diff --git a/src/pdumper.c b/src/pdumper.c index f66f3fedb9a..ec1af3cae56 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -4885,7 +4885,7 @@ dump_read_all (int fd, void *buf, size_t bytes_to_read) while (bytes_read < bytes_to_read) { /* Some platforms accept only int-sized values to read. */ - unsigned chunk_to_read = UINT_MAX; + unsigned chunk_to_read = INT_MAX; if (bytes_to_read - bytes_read < chunk_to_read) chunk_to_read = (unsigned)(bytes_to_read - bytes_read); ssize_t chunk =