Log window size change events in the sudoers I/O plugin.
Let sudoreplay parse a timing file with window change events (currently ignored).
This commit is contained in:
@@ -453,7 +453,7 @@ replay_session(const double max_wait, const char *decimal)
|
||||
sudo_ev_loop(evbase, 0);
|
||||
|
||||
/* Even if we are not replaying, we still have to delay. */
|
||||
if (idx >= IOFD_MAX || io_log_files[idx].fd.v == NULL)
|
||||
if (idx >= IOFD_TIMING || io_log_files[idx].fd.v == NULL)
|
||||
continue;
|
||||
|
||||
/* Check whether we need to convert newline to CR LF pairs. */
|
||||
@@ -1196,7 +1196,7 @@ parse_timing(const char *buf, const char *decimal, int *idx, double *seconds,
|
||||
ul = strtoul(buf, &ep, 10);
|
||||
if (ep == buf || !isspace((unsigned char) *ep))
|
||||
goto bad;
|
||||
if (ul >= IOFD_TIMING) {
|
||||
if (ul >= IOFD_MAX) {
|
||||
if (ul != 6)
|
||||
goto bad;
|
||||
/* work around a bug in timing files generated by sudo 1.8.7 */
|
||||
@@ -1232,7 +1232,8 @@ parse_timing(const char *buf, const char *decimal, int *idx, double *seconds,
|
||||
|
||||
errno = 0;
|
||||
ul = strtoul(cp, &ep, 10);
|
||||
if (ep == cp || *ep != '\0' || (errno == ERANGE && ul == ULONG_MAX))
|
||||
if (ep == cp || (*ep != '\0' && !isspace((unsigned char) *ep)) ||
|
||||
(errno == ERANGE && ul == ULONG_MAX))
|
||||
goto bad;
|
||||
*nbytes = (size_t)ul;
|
||||
|
||||
|
Reference in New Issue
Block a user