From: Todd C. Miller Date: Thu, 3 Sep 2009 23:27:24 +0000 (+0000) Subject: Sanity check sessid before using it. X-Git-Tag: SUDO_1_7_3~313 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1fe4492f4c38b8605c3c0deb941a3cefaae03d9;p=sudo Sanity check sessid before using it. --- diff --git a/script.c b/script.c index 0b69fef7f..a0ac86f74 100644 --- a/script.c +++ b/script.c @@ -171,6 +171,9 @@ build_idpath(pathbuf) struct stat sb; int i, len; + if (sudo_user.sessid[0] == '\0') + log_error(0, "tried to build a session id path without a session id"); + /* * Path is of the form /var/log/sudo-session/00/00/01. */