Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!mordor!sri-spam!sri-unix!hplabs!sdcrdcf!lwall From: lwall@sdcrdcf.UUCP (Larry Wall) Newsgroups: news.software.b,comp.sources.bugs Subject: rn 4.3 patch #36 Message-ID: <3434@sdcrdcf.UUCP> Date: Mon, 17-Nov-86 14:59:22 EST Article-I.D.: sdcrdcf.3434 Posted: Mon Nov 17 14:59:22 1986 Date-Received: Mon, 17-Nov-86 22:11:37 EST Organization: System Development Corporation R&D, Santa Monica Lines: 78 Xref: mnetor news.software.b:17 comp.sources.bugs:1 System: rn version 4.3 Patch #: 36 Priority: depends Subject: Rn can dump core on 16 bit machines From: mn-at1!alan (Alan Klietz) Description: Rn dumps core on 16 bit machines when adding a new newsgroup to the .newsrc file. Repeat by: Create a new newsgroup and then run rn. It will dump core. Fix: The birthof() procedure fails to coerce the null pointer to the time() system call to (long *). This results in a 16 bit quantity being pushed on the stack which is derefernced by the time() system call as a 32 bit quantity. This results in a segment violation. The fix is to use a properly coerced pointer. From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch Patch #: 36 Index: addng.c *** addng.c.orig Tue Nov 11 17:03:35 1986 --- addng.c Tue Nov 11 17:08:28 1986 *************** *** 111,117 sprintf(tst, ngsize ? "%s/%s/1" : "%s/%s" ,spool,getngdir(ngnam)); if (stat(tst,&filestat) < 0) ! return (ngsize ? 0L : time(0)); /* not there, assume something good */ else return filestat.st_mtime; } --- 111,118 ----- sprintf(tst, ngsize ? "%s/%s/1" : "%s/%s" ,spool,getngdir(ngnam)); if (stat(tst,&filestat) < 0) ! return (ngsize ? 0L : time(Null(long *))); ! /* not there, assume something good */ else return filestat.st_mtime; }