patch to fix segfault on startup under certain conditions
authorBdale Garbee <bdale@gag.com>
Tue, 27 Sep 2011 03:56:19 +0000 (21:56 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 27 Sep 2011 03:56:19 +0000 (21:56 -0600)
debian/changelog
debian/patches/fix-segfault-on-start.diff [new file with mode: 0644]
debian/patches/series

index 4d89444ad2388e1c019ef313812aabeeb0378ed1..e04a986fd0a64f3d6554f68df9a58c74d1bf58b2 100644 (file)
@@ -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 <bdale@gag.com>  Mon, 26 Sep 2011 20:33:40 -0600
+ -- Bdale Garbee <bdale@gag.com>  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 (file)
index 0000000..7899130
--- /dev/null
@@ -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;
index 4e3aa5b4cc9e9cec21c18d7c309865b328c69b81..be55d1e45042cfe27014f77412d8115022858c07 100644 (file)
@@ -1,3 +1,4 @@
 typo-in-classic-insults.diff
 paths-in-samples.diff
 upstream-sigbus-fix
+fix-segfault-on-start.diff