diff options
author | tonio <tonio@pkgsrc.org> | 2007-05-27 17:39:47 +0000 |
---|---|---|
committer | tonio <tonio@pkgsrc.org> | 2007-05-27 17:39:47 +0000 |
commit | bb9a78e1f11893478f65754274806bc36eeac3fc (patch) | |
tree | 79953c50f8e5312a614e158b82eecc798f010bed /mail/mutt-devel/patches | |
parent | a9c5f533c6b7029b34ef774367553c3c839c2ab4 (diff) | |
download | pkgsrc-bb9a78e1f11893478f65754274806bc36eeac3fc.tar.gz |
Add a fix for Fix CVE-2007-2683
Bump PKGREVISION
Use signed arithmetic in mutt_gecos_name to avoid an overflow.
From http://dev.mutt.org/hg/mutt/rev/47d08903b79b
And trac: http://dev.mutt.org/trac/ticket/2885
Diffstat (limited to 'mail/mutt-devel/patches')
-rw-r--r-- | mail/mutt-devel/patches/patch-am | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mail/mutt-devel/patches/patch-am b/mail/mutt-devel/patches/patch-am new file mode 100644 index 00000000000..4c0b0aee93a --- /dev/null +++ b/mail/mutt-devel/patches/patch-am @@ -0,0 +1,17 @@ +$NetBSD: patch-am,v 1.3 2007/05/27 17:39:48 tonio Exp $ + +Use signed arithmetic in mutt_gecos_name to avoid an overflow. +From http://dev.mutt.org/hg/mutt/rev/47d08903b79b +Fix CVE-2007-2683 + +--- muttlib.c.orig 2007-04-03 19:52:56.000000000 +0200 ++++ muttlib.c +@@ -540,7 +540,7 @@ char *mutt_gecos_name (char *dest, size_ + if (dest[idx] == '&') + { + memmove (&dest[idx + pwnl], &dest[idx + 1], +- MAX(destlen - idx - pwnl - 1, 0)); ++ MAX((ssize_t)(destlen - idx - pwnl - 1), 0)); + memcpy (&dest[idx], pw->pw_name, MIN(destlen - idx - 1, pwnl)); + dest[idx] = toupper ((unsigned char) dest[idx]); + } |