Skip to content

Commit be5e850

Browse files
committed
Merge branch 'js/xread-in-full' into maint
* js/xread-in-full: stream_to_pack: xread does not guarantee to read all requested bytes
2 parents 31d757d + e92527c commit be5e850

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bulk-checkin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static int stream_to_pack(struct bulk_checkin_state *state,
114114

115115
if (size && !s.avail_in) {
116116
ssize_t rsize = size < sizeof(ibuf) ? size : sizeof(ibuf);
117-
if (xread(fd, ibuf, rsize) != rsize)
117+
if (read_in_full(fd, ibuf, rsize) != rsize)
118118
die("failed to read %d bytes from '%s'",
119119
(int)rsize, path);
120120
offset += rsize;

0 commit comments

Comments
 (0)