Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!sdcrdcf!lwall From: lwall@sdcrdcf.UUCP (Larry Wall) Newsgroups: news.software.b,net.sources.bugs Subject: rn 4.3 patch #38 Message-ID: <3436@sdcrdcf.UUCP> Date: Mon, 17-Nov-86 15:15:34 EST Article-I.D.: sdcrdcf.3436 Posted: Mon Nov 17 15:15:34 1986 Date-Received: Mon, 17-Nov-86 22:35:31 EST Organization: System Development Corporation R&D, Santa Monica Lines: 75 Xref: mnetor news.software.b:19 net.sources.bugs:890 System: rn version 4.3 Patch #: 38 Priority: depends Subject: Rn dumps core on 16 bit USG machines From: mn-at1!alan (Alan Klietz) Description: Rn dumps core on opening a directory. This only happens on machines that make use of the ndir.c that comes with rn. Repeat by: Run rn on a 16 bit System V machine (e.g. Xenix or Microport UNIX/V). Watch it dump core. Fix: The opendir() routine fails to declare malloc() as (char *). This results in a 16 bit value being passed to the directory routine when a 32 bit value is really required. The fix is to declare malloc(). From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch Patch #: 38 Index: ndir.c *** ndir.c.orig Sun Nov 9 21:04:03 1986 --- ndir.c Sun Nov 9 21:04:09 1986 *************** *** 34,39 { register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) return NULL; --- 34,40 ----- { register DIR *dirp; register int fd; + char *malloc(); if ((fd = open(name, 0)) == -1) return NULL;