Overrun tolerant?

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 08/19/97


Tue Aug 19 22:59:55 :: Overflow Test!
Tue Aug 19 22:59:55 :: SYSERR: BUF: clear_buffer: Overflow in buffer from
test_overflow:493.
Tue Aug 19 22:59:55 :: Test done!
Segmentation fault (core dumped)

When scanning the buffer list for a new buffer to give out after a
corruption, the game will crash because the list has been mangled.

If PARANOID_OVERFLOW is defined, the buffer list is cleared upon a
corruption:

Tue Aug 19 23:02:19 :: Overflow Test!
Tue Aug 19 23:02:19 :: SYSERR: BUF: clear_buffer: Overflow in buffer from
test_overflow:493.
Tue Aug 19 23:02:19 :: *** BUFFER LIST CLEARED! ***
Tue Aug 19 23:02:19 :: Test done!
Tue Aug 19 23:02:19 :: BUF: Didn't find 512 byte buffer! Making a new one.
[...etc...]
Tue Aug 19 23:02:43 :: Entering game loop.
Tue Aug 19 23:02:43 :: No connections.  Going to sleep.

Upon loading, I logged in, read two board messages, did a who, and then did
a shutdown of the MUD.

Not sure how well it'll work, but I stuffed about 180 characters in a 128
byte buffer with sprintf() to get these results.  It also worked doing the
same copy with strcpy().

I'll test it on an AIX machine to see if it is Linux-specific later.

--
greerga@muohio.edu me@null.net | Genius may have its limitations, but stupidity
http://www.muohio.edu/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST