Use safe read
authorGlenn L McGrath <bug1@ihug.co.nz>
Fri, 21 Nov 2003 22:17:28 +0000 (22:17 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Fri, 21 Nov 2003 22:17:28 +0000 (22:17 -0000)
archival/libunarchive/decompress_uncompress.c
archival/libunarchive/uncompress.c

index 5046e8a26e18fe04fd1319ab26d3d3b7b5b2937a..65418a7cacd58a20fe1a0fda8e75541beea55e1e 100644 (file)
@@ -164,7 +164,7 @@ extern int uncompress(int fd_in, int fd_out)
                }
 
                if (insize < (int) sizeof(inbuf) - IBUFSIZ) {
-                       rsize = read(fd_in, inbuf + insize, IBUFSIZ);
+                       rsize = safe_read(fd_in, inbuf + insize, IBUFSIZ);
                        insize += rsize;
                }
 
index 5046e8a26e18fe04fd1319ab26d3d3b7b5b2937a..65418a7cacd58a20fe1a0fda8e75541beea55e1e 100644 (file)
@@ -164,7 +164,7 @@ extern int uncompress(int fd_in, int fd_out)
                }
 
                if (insize < (int) sizeof(inbuf) - IBUFSIZ) {
-                       rsize = read(fd_in, inbuf + insize, IBUFSIZ);
+                       rsize = safe_read(fd_in, inbuf + insize, IBUFSIZ);
                        insize += rsize;
                }