|
|
@@ -246,9 +246,14 @@ static bool check_with_child(struct ptr_valid_batch *batch,
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- write(batch->to_child, &p, sizeof(p));
|
|
|
- write(batch->to_child, &size, sizeof(size));
|
|
|
- write(batch->to_child, &is_write, sizeof(is_write));
|
|
|
+ if (write(batch->to_child, &p, sizeof(p))
|
|
|
+ + write(batch->to_child, &size, sizeof(size))
|
|
|
+ + write(batch->to_child, &is_write, sizeof(is_write))
|
|
|
+ != sizeof(p) + sizeof(size) + sizeof(is_write)) {
|
|
|
+ finish_child(batch);
|
|
|
+ errno = EFAULT;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
if (read(batch->from_child, &ret, sizeof(ret)) != sizeof(ret)) {
|
|
|
finish_child(batch);
|