]> git.eshelyaron.com Git - emacs.git/commitdiff
Use INT_MAX, not UINT_MAX, as limit for read()
authorDaniel Colascione <dancol@dancol.org>
Mon, 19 Feb 2018 20:28:43 +0000 (12:28 -0800)
committerDaniel Colascione <dancol@dancol.org>
Mon, 19 Feb 2018 20:28:43 +0000 (12:28 -0800)
src/pdumper.c

index f66f3fedb9a54594102753a41ff0f47c4c3764a8..ec1af3cae5667c265ddca1ca418b1eeee530bc91 100644 (file)
@@ -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 =