Files
nethack/win
PatR 99ed00012e curses message history
The curses interface maintains message history in a doubly linked list
with a capacity limit.  Once capacity is reached, the list head is
advanced and the old head discarded, but it was leaving the new head's
'previous element' link pointing at that discarded element.
  tmp_mesg = first_mesg->next_mesg;
(at this stage, tmp_mesg->prev_mesg points at first_mesg),
  free(first_mesg);
  first_mesg = tmp_mesg;
(with necessary 'first_mesg->prev_msg = NULL' missing).  The situation
wasn't a significant problem because traversing the list was limited
by a counter.  Going from tail back to head exhausted the counter
without ever accessing the stale pointer.

Since it wasn't noticeable, I haven't added a fixes entry for this.
I've also changed it to do fewer memory allocations and frees by
reusing the old list head instead of always allocating a new element
and freeing the one being replaced.
2019-03-26 02:30:59 -07:00
..
2018-11-11 10:29:52 -05:00
2019-03-26 02:30:59 -07:00
2019-01-29 17:14:55 -08:00
2019-01-29 17:14:55 -08:00
2018-11-11 10:29:52 -05:00
2019-01-29 17:07:00 -05:00
2019-03-12 21:30:22 -04:00
2019-02-19 18:25:02 -08:00
2019-03-12 18:37:15 -07:00