Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!allegra!mp From: mp@allegra.UUCP (Mark Plotnick) Newsgroups: comp.bugs.4bsd Subject: memory fault in refer/indxbib/inv Message-ID: <6405@allegra.UUCP> Date: Tue, 30-Dec-86 13:30:19 EST Article-I.D.: allegra.6405 Posted: Tue Dec 30 13:30:19 1986 Date-Received: Tue, 30-Dec-86 21:39:50 EST Organization: AT&T Bell Laboratories, Murray Hill Lines: 16 Due to an uninitialized variable, /usr/lib/refer/inv (which is called by indxbib) may die with a memory fault (well, OK, it's a bus error). The fix is ------- inv1.c ------- 22c22 < FILE *fa, *fb, *fc, *fta, *ftb, *ftc, *fd; --- > FILE *fa, *fb, *fc, *fta, *ftb, *ftc, *fd = NULL; Since fd is defined in main(), the problem has only shown up here on Suns (2.0 and 3.0), since a function or two is called before main(). This results in fd beginning life with the value 1. newkeys() sort of depends on fd being either NULL or a valid FILE pointer. Mark Plotnick allegra!mp