mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Use safe read
This commit is contained in:
parent
d0550d8fc9
commit
1a2d75fd72
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user