🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs
Article #491

MH.6 bug

#491
From: Timothy G. Becker
Date: Fri, 10 Jan 1986 21:03
39 lines
1876 bytes
I'm running MH.6 on a 4.2bsd system.

When are holes in the msg list (because rmm'd msgs), scan would
sometimes complain about not being able to open one of these nonexistant
msgs.  In one case, "folder -pack" complained and quit after trying to
compact the msg list.

Below is the fix to sbr/m_gmsg.c
=============================================================================

*** /tmp/,RCSt1004632	Fri Jan 10 15:44:19 1986 (old)
--- /tmp/,RCSt2004632	Fri Jan 10 15:44:22 1986 (new)
***************
*** 186,191
      if (mp -> msgstats < 0)
  	adios (NULLCP, "m_gmsg() botch -- you lose big");
  #endif	MTR
      for (tail = head; tail < rover; tail++)
  	mp -> msgstats[tail -> msgno] = tail -> stats;
      m_getatr (mp);

--- 186,198 -----
      if (mp -> msgstats < 0)
  	adios (NULLCP, "m_gmsg() botch -- you lose big");
  #endif	MTR
+ 
+     /* clear msgstats since realloc() doesn't clear the memory it
+        allocates.  without this, some nonexistant msgno's have valid
+        looking msgstats. */
+     for (i=0;i<mp->hghmsg;++i)
+         mp->msgstats[i] = 0;
+ 
      for (tail = head; tail < rover; tail++)
  	mp -> msgstats[tail -> msgno] = tail -> stats;
      m_getatr (mp);


Tim Becker.
..!{seismo,allegra,decvax}!rochester!ccice5!tim
Technical Details
Message-ID: <986@ccice5.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!rochester!ritcv!ccivax!ccice5!tim

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ccice5.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!rochester!ritcv!ccivax!ccice5!tim
From: tim@ccice5.UUCP (Timothy G. Becker)
Newsgroups: net.bugs
Subject: MH.6 bug
Message-ID: <986@ccice5.UUCP>
Date: Fri, 10-Jan-86 16:03:38 EST
Article-I.D.: ccice5.986
Posted: Fri Jan 10 16:03:38 1986
Date-Received: Wed, 15-Jan-86 01:29:23 EST
Organization: CCI Central Engineering, Rochester, NY
Lines: 39