Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plugins/sudoers/sudoreplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,17 @@ write_output(int fd, int what, void *v)
}

if (iobuf->off == iobuf->len) {
if (iobuf->toread != 0) {
/*
* Record is larger than the I/O buffer, reset the buffer and
* reschedule to write the rest of the record before advancing.
*/
iobuf->off = 0;
iobuf->len = 0;
if (sudo_ev_add(NULL, closure->output_ev, NULL, false) == -1)
sudo_fatal("%s", U_("unable to add event to queue"));
debug_return;
}
/* Write complete, go to next timing entry if possible. */
switch (get_timing_record(closure)) {
case 0:
Expand Down
Loading