1
0
forked from pool/mutt
mutt/bsc907453-CVE-2014-9116-jessie.patch
2017-04-28 14:47:43 +00:00

31 lines
874 B
Diff

This patch solves the issue raised by CVE-2014-9116 in bug 771125.
We correctly redefine what are the whitespace characters as per RFC5322; by
doing so we prevent mutt_substrdup from being used in a way that could lead to
a segfault.
The lib.c part was written by Antonio Radici <antonio@debian.org> to prevent
crashes due to this kind of bugs from happening again.
The wheezy version of this patch is slightly different, therefore this patch
has -jessie prefixed in its name.
Index: mutt/lib.c
===================================================================
---
lib.c | 3 +++
1 file changed, 3 insertions(+)
--- lib.c
+++ lib.c 2017-04-28 13:46:19.479130332 +0000
@@ -825,6 +825,9 @@ char *mutt_substrdup(const char *begin,
size_t len;
char *p = NULL;
+ if (end != NULL && end < begin)
+ return NULL;
+
if (end)
len = end - begin;
else