🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
1 messages
1 total messages Started by David M. Katinsky Thu, 23 Apr 1992 03:18
Bug fix.
#2689
Author: David M. Katinsky
Date: Thu, 23 Apr 1992 03:18
37 lines
1801 bytes
Below, find a patch that remedies the following situation. In the case of a
missing .newsrc file if the user requests to rebuild from scratch nn will dump
core. There are two possible places to fix this; I have chosen the lowest level
routine, only.

The first place that we could fix this is ~line 379 of newsrc.c . At this
point we could check to see if we have an "rcfile" before executing (any of?)
this switch. The second place is line 485 of global.c . Fixing the problem here
will prevent any other errant callers from causing a problem (here anyways).



------- global.c -------
*** /tmp/da03053	Wed Apr 22 23:08:56 1992
--- global.c	Wed Apr 22 23:06:38 1992
***************
*** 482,488 ****
  {
      struct stat st;
  
!     if (fstat(fileno(f), &st) < 0) return 0;
      return st.st_mtime;
  }
  
--- 482,488 ----
  {
      struct stat st;
  
!     if (!f || fstat(fileno(f), &st) < 0) return 0;
      return st.st_mtime;
  }
  
-- 

						dmk
David M. Katinsky
dmk@hardees.rutgers.edu, dmk@njin.BITNET, {njin, rutgers}!dmk
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