Article View: news.software.nn
Article #2689Bug fix.
From: David M. Katinsky
Date: Thu, 23 Apr 1992 03:18
Date: Thu, 23 Apr 1992 03:18
37 lines
1801 bytes
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
Technical Details
Message-ID:
<Apr.22.23.18.32.1992.3102@theaetetus.rutgers.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!cis.ohio-state.edu!rutgers!rudy.rutgers.edu!theaetetus.rutgers.edu!dmkShow Full Headers
Complete Article Headers
Message-ID: <Apr.22.23.18.32.1992.3102@theaetetus.rutgers.edu> Subject: Bug fix. Date: Thu, 23 Apr 1992 03:18:33 +0000 From: dmk@theaetetus.rutgers.edu (David M. Katinsky) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!cis.ohio-state.edu!rutgers!rudy.rutgers.edu!theaetetus.rutgers.edu!dmk Newsgroups: news.software.nn Summary: fixed core dump when missing .newsrc Keywords: patch Reply-To: dmk@hardees.rutgers.edu Organization: Rutgers Univ., New Brunswick, N.J. Lines: 37 X-Telephone: +1 908 932-4783 X-Fax: +1 908 932-2968