Package: mutt-patched Version: 1.5.21-5 Followup-For: Bug #639854 When running this comment got a segmentation fault:
~ $ mutt -e "set sidebar_delim=" Sorting mailbox...Segmentation fault This because the sidebardelim string is not validated before doing a strlen, which causes a segmentation fault. This patch ensure that the variable is not null. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (900, 'testing'), (800, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages mutt-patched depends on: ii libc6 2.13-27 ii libcomerr2 1.42.2-2 ii libgnutls26 2.12.18-1 ii libgpg-error0 1.10-3 ii libgpgme11 1.2.0-1.4 ii libgssapi-krb5-2 1.10+dfsg~beta1-2 ii libidn11 1.24-2 ii libk5crypto3 1.10+dfsg~beta1-2 ii libkrb5-3 1.10+dfsg~beta1-2 ii libncursesw5 5.9-6 ii libnotmuch2 0.12-1 ii libsasl2-2 2.1.25.dfsg1-4 ii libtinfo5 5.9-6 ii libtokyocabinet9 1.4.47-1 ii mutt 1.5.21-5 mutt-patched recommends no packages. mutt-patched suggests no packages. -- no debconf information
>From dec9e02d322bc410b1a1f82604127573b760f1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaq...@igalia.com> Date: Mon, 23 Apr 2012 00:38:03 +0200 Subject: [PATCH] sidebar: fix null string segmentation fault When running this comment got a segmentation fault: ~ $ mutt -e "set sidebar_delim=" Sorting mailbox...Segmentation fault This because the sidebardelim string is not validated before doing a strlen, which causes a segmentation fault. This patch ensure that the variable is not null. Conflicts: debian/patches/series --- debian/patches/mutt-patched/sidebar-delim | 22 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 23 insertions(+) create mode 100644 debian/patches/mutt-patched/sidebar-delim diff --git a/debian/patches/mutt-patched/sidebar-delim b/debian/patches/mutt-patched/sidebar-delim new file mode 100644 index 0000000..8a749ff --- /dev/null +++ b/debian/patches/mutt-patched/sidebar-delim @@ -0,0 +1,22 @@ +Index: mutt/sidebar.c +=================================================================== +--- mutt.orig/sidebar.c 2012-04-23 00:26:47.000000000 +0200 ++++ mutt/sidebar.c 2012-04-23 00:29:18.000000000 +0200 +@@ -117,7 +117,7 @@ + int box_len, box_bytes; + int int_len; + int right_offset = 0; +- int delim_len = strlen(SidebarDelim); ++ int delim_len = strlen(NONULL(SidebarDelim)); + static char *entry; + + right_width = left_width = 0; +@@ -209,7 +209,7 @@ + #ifndef USE_SLANG_CURSES + attr_t attrs; + #endif +- short delim_len = strlen(SidebarDelim); ++ short delim_len = strlen(NONULL(SidebarDelim)); + short color_pair; + + static bool initialized = false; diff --git a/debian/patches/series b/debian/patches/series index 49dac3d..d458178 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -61,6 +61,7 @@ mutt-patched/sidebar-dotted mutt-patched/sidebar-sorted mutt-patched/sidebar-utf8 mutt-patched/multiple-fcc +mutt-patched/sidebar-delim # not applying cleanly at the moment #mutt-patched/nntp -- 1.7.9.5