From 3aad381186d515a0746e16ff5be288842f757c18 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 7 Jun 2010 18:53:58 -0400 Subject: [PATCH] Add #define for maximum session id --- plugins/sudoers/iolog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/sudoers/iolog.c b/plugins/sudoers/iolog.c index ad1d976e7..4f3897f4c 100644 --- a/plugins/sudoers/iolog.c +++ b/plugins/sudoers/iolog.c @@ -75,6 +75,8 @@ struct script_buf { #define IOFD_TIMING 5 #define IOFD_MAX 6 +#define SESSID_MAX 2176782336U + static struct timeval last_time; static union io_fd io_fds[IOFD_MAX]; extern struct io_plugin sudoers_io; @@ -120,7 +122,7 @@ io_nextid(void) if (nread == -1) log_error(USE_ERRNO, "cannot read %s", pathbuf); id = strtoul(buf, &ep, 36); - if (buf == ep || id >= 2176782336U) + if (buf == ep || id >= SESSID_MAX) log_error(0, "invalid sequence number %s", pathbuf); } id++; -- 2.40.0