aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorvanilla <vanilla@FreeBSD.org>2001-06-26 17:53:39 +0800
committervanilla <vanilla@FreeBSD.org>2001-06-26 17:53:39 +0800
commite4a84f36e9f47d28a609599b98ce10b8631519ce (patch)
tree2ed757137cad4f4c69423b7967dde12faacd12e4 /mail
parent5e09444f6e398c0f0ae8729824a884bd78aee8b0 (diff)
downloadfreebsd-ports-gnome-e4a84f36e9f47d28a609599b98ce10b8631519ce.tar.gz
freebsd-ports-gnome-e4a84f36e9f47d28a609599b98ce10b8631519ce.tar.zst
freebsd-ports-gnome-e4a84f36e9f47d28a609599b98ce10b8631519ce.zip
Fix segfaults when accessing a mailbox with 512 messages.
PR: ports/28099 Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Diffstat (limited to 'mail')
-rw-r--r--mail/cucipop/files/patch-ac15
1 files changed, 12 insertions, 3 deletions
diff --git a/mail/cucipop/files/patch-ac b/mail/cucipop/files/patch-ac
index 1acb21e30ae7..391df7a5f4fd 100644
--- a/mail/cucipop/files/patch-ac
+++ b/mail/cucipop/files/patch-ac
@@ -1,6 +1,6 @@
---- cucipop.c.bak Wed May 13 20:57:39 1998
-+++ cucipop.c Sun Mar 28 17:08:28 1999
-@@ -45,7 +45,7 @@
+--- cucipop.c.orig Tue Jun 26 17:51:11 2001
++++ cucipop.c Tue Jun 26 17:51:50 2001
+@@ -48,7 +48,7 @@
#include "hsort.h"
#ifdef APOP
@@ -9,3 +9,12 @@
#endif
#define MD5_DIGLEN 16
+@@ -314,7 +314,7 @@
+
+ static void addblock(const off_t start)
+ { if(msgs_filled==msgs_max&&
+- !(msgs=realloc(msgs,(msgs_max+=GROWSTEP)*sizeof*msgs)))
++ !(msgs=realloc(msgs,((msgs_max+=GROWSTEP)+1)*sizeof*msgs)))
+ outofmem();
+ msgs[msgs_filled].order=msgs_filled;msgs[msgs_filled].start=start;
+ msgs[msgs_filled].virtsize=0;msgs[msgs_filled++].deleted=0;