From: Bdale Garbee Date: Tue, 27 Sep 2011 03:56:19 +0000 (-0600) Subject: patch to fix segfault on startup under certain conditions X-Git-Tag: debian/1.8.2-2~2 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=f80966f830a138f1ccdaff86d615b71b15be2537;p=debian%2Fsudo patch to fix segfault on startup under certain conditions --- diff --git a/debian/changelog b/debian/changelog index 4d89444..e04a986 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,10 @@ sudo (1.8.2-2) UNRELEASED; urgency=low * patch from upstream for SIGBUS on sparc64, closes: #640304 * use common-session-noninteractive in the pam config to reduce log noise when sudo is used in cron, etc, closes: #519700 + * patch from Steven McDonald to fix segfault on startup under certain + conditions, closes: #639568 - -- Bdale Garbee Mon, 26 Sep 2011 20:33:40 -0600 + -- Bdale Garbee Mon, 26 Sep 2011 21:55:56 -0600 sudo (1.8.2-1) unstable; urgency=low diff --git a/debian/patches/fix-segfault-on-start.diff b/debian/patches/fix-segfault-on-start.diff new file mode 100644 index 0000000..7899130 --- /dev/null +++ b/debian/patches/fix-segfault-on-start.diff @@ -0,0 +1,12 @@ +Fixes segfault on startup under certain conditions +--- a/src/utmp.c ++++ b/src/utmp.c +@@ -96,7 +96,7 @@ + size_t idlen; + + /* Skip over "tty" in the id if old entry did too. */ +- if (strncmp(line, "tty", 3) == 0) { ++ if (old != NULL && strncmp(line, "tty", 3) == 0) { + idlen = MIN(sizeof(old->ut_id), 3); + if (strncmp(old->ut_id, "tty", idlen) != 0) + line += 3; diff --git a/debian/patches/series b/debian/patches/series index 4e3aa5b..be55d1e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ typo-in-classic-insults.diff paths-in-samples.diff upstream-sigbus-fix +fix-segfault-on-start.diff