🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #1516

4.0p1 core dump and fix

#1516
From: t e bennett
Date: Thu, 30 Apr 1992 18:54
39 lines
1500 bytes
xdispepoch.c can deref a null ptr and cause core dumps.

This is very similar to a previously fixed problem 
in xdispepoch.c.

Patch:


*** xdispepoch.c~	Mon Apr 27 10:08:02 1992
--- xdispepoch.c	Thu Apr 30 14:45:38 1992
***************
*** 1980,1990 ****
    {
      int i;
      struct line_header *l = XLINE(w->lines);
!     struct char_block *cb;
  
      i = ws->cursor_y;
      while (l && i--) l = l->next;
!     cb = l->body;
      i = ws->cursor_x;
      while (cb && i--) cb = cb->next;
  
--- 1980,1991 ----
    {
      int i;
      struct line_header *l = XLINE(w->lines);
!     struct char_block *cb = 0;
  
      i = ws->cursor_y;
      while (l && i--) l = l->next;
!     if (l)
!         cb = l->body;
      i = ws->cursor_x;
      while (cb && i--) cb = cb->next;
  
--
--tbennett     tony.bennett@East.Sun.COM   mailstop: RTP-NC
Technical Details
Message-ID: <TONY.BENNETT.92Apr30145407@uh-oh.East.Sun.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!news2me.ebay.sun.com!cronkite.Central.Sun.COM!sixgun.East.Sun.COM!sunpix!tony.bennett

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,9896c9932025a120,start
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1992-04-30 11:54:07 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!news2me.ebay.sun.com!cronkite.Central.Sun.COM!sixgun.East.Sun.COM!sunpix!tony.bennett
From: tony.bennett@East.Sun.COM (t e bennett)
Newsgroups: gnu.epoch.misc
Subject: 4.0p1 core dump and fix
Date: 30 Apr 92 18:54:07 GMT
Organization: Sun Microsystems, RTP, NC
Lines: 39
Distribution: gnu
Message-ID: <TONY.BENNETT.92Apr30145407@uh-oh.East.Sun.COM>
NNTP-Posting-Host: uh-oh.east.sun.com