From: Jérémie Galarneau Date: Fri, 27 Apr 2018 21:30:50 +0000 (-0400) Subject: Fix: partial writes of padding are not checked X-Git-Tag: v2.11.0-rc1~259 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=46f4eaa5c2a4e5f106ca105e2a93018e8fd4e477;p=lttng-tools.git Fix: partial writes of padding are not checked Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 09a73e392..168332018 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -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);