Fix: partial writes of padding are not checked
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 27 Apr 2018 21:30:50 +0000 (17:30 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 27 Apr 2018 22:54:17 +0000 (18:54 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/main.c

index 09a73e392ada24798e5e1c143000f0572a253c2f..1683320188ef15bada61e84b4e2c7495acfc140e 100644 (file)
@@ -3426,7 +3426,7 @@ static enum relay_connection_status relay_process_data_receive_payload(
 
        ret = write_padding_to_file(stream->stream_fd->fd,
                        state->header.padding_size);
-       if (ret < 0) {
+       if ((int64_t) ret < (int64_t) state->header.padding_size) {
                ERR("write_padding_to_file: fail stream %" PRIu64 " net_seq_num %" PRIu64 " ret %d",
                                stream->stream_handle,
                                state->header.net_seq_num, ret);
This page took 0.035219 seconds and 4 git commands to generate.