I sent this to nmh-bugs. Just in case that is a black hole with no readers, I am also forwarding it to nmh-workers. -NWR ------- Forwarded Message Date: Mon, 06 Mar 2000 12:04:21 -0600 From: Neil W Rickert <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Bug in msh.c This is a multipart MIME message. - --==_Exmh_-15175783520 Content-Type: text/plain; charset=us-ascii Neil W Rickert <[EMAIL PROTECTED]> wrote: >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. >Patch attached. On second thoughts, use the patch attached to this message rather than the earlier one. It should be better for future maintenance, although it is equivalent in effect. -NWR - --==_Exmh_-15175783520 Content-Type: text/plain ; name="patch"; charset=us-ascii Content-Description: patch Content-Disposition: attachment; filename="patch" - --- msh.c 2000/03/06 16:41:18 1.1 +++ msh.c 2000/03/06 17:54:28 @@ -754,7 +754,7 @@ 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; - --==_Exmh_-15175783520-- ------- End of Forwarded Message