🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Dave Detlefs Fri, 17 Jul 1992 18:10
Bug in Epoch-4.0p2
#1224
Author: Dave Detlefs
Date: Fri, 17 Jul 1992 18:10
39 lines
1678 bytes
I've been using epoch-4.0p2, with happiness about the neat features,
but a little disapointment with the reliability: it was crashing on me
a few times a day.  I finally summoned the gumption to investigate one
of the core files, and found what seems to be a clear bug in button.c.

The function PlotTextLine, which begins on line 1574, defines
  
  char buf[1000];		/* Buffer for constructing string. */
  char *pos;			/* Position in buf */

and later says

  pos = buf;

a few lines later, at 1604, we have

      if (cb->style == s && n < 9999)
	{
	  *pos++ = cb->ch;

The number 9999 should be, I believe 999.  The value of n in the core
file I investigated was 1019, and the argument 'w' had been
overwritten, causing an unaligned access.  More succinctly, the diffs
are:

1604c1604
<       if (cb->style == s && n < 999)
---
>       if (cb->style == s && n < 9999)


The main research effort I'm involved with is trying to, among other
things, prove the absence of array bounds errors at compile time (for
Modula-3).  I will save this one as a good example :-)

Hope this helps.  Keep up the great work!

Dave
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads