From ba32dee02e85132dd8bd05fae876692d61c50053 Mon Sep 17 00:00:00 2001 From: Dan Harkless Date: Mon, 6 Mar 2000 20:19:04 +0000 Subject: [PATCH] Applied Neil W Rickert 's msh.c patch: I finally tracked down the problem in msh that was causing errors whenever I tried to examine a 'mmdf' style mailbox. It turns out that not enough memory was being allocated with calloc(), causing memory pointers to be overwritten and corrupted. --- ChangeLog | 10 ++++++++++ uip/msh.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9a29c0f..7aa74d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Mon Mar 06 12:20:20 2000 Dan Harkless + + * Applied Neil W Rickert 's msh.c patch: + + I finally tracked down the problem in msh that was causing errors + whenever I tried to examine a 'mmdf' style mailbox. + + It turns out that not enough memory was being allocated with + calloc(), causing memory pointers to be overwritten and corrupted. + Fri Mar 03 16:07:33 2000 Dan Harkless * Changed the new "plussed_user" option to mts.conf's diff --git a/uip/msh.c b/uip/msh.c index 2769c24..eeb87a1 100644 --- a/uip/msh.c +++ b/uip/msh.c @@ -754,7 +754,7 @@ setup (char *file) if (!(mp = (struct msgs *) calloc ((size_t) 1, sizeof(*mp)))) padios (NULL, "unable to allocate folder storage"); - if (!(mp->msgstats = calloc ((size_t) 1, msgp + 3))) + if (!(mp->msgstats = calloc ((size_t) msgp + 3, sizeof(*(mp->msgstats))))) padios (NULL, "unable to allocate message status storage"); mp->hghmsg = msgp; -- 1.7.10.4