From 229859935f3c776bfa51b91c05302e8d124177d1 Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Mon, 19 Feb 2018 12:28:43 -0800 Subject: [PATCH] Use INT_MAX, not UINT_MAX, as limit for read() --- src/pdumper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = -- 2.39.5