Fix: partial writes of padding are not checked
[lttng-tools.git] / 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.023894 seconds and 4 git commands to generate.