[comp.bugs.4bsd] memory fault in refer/indxbib/inv

mp@allegra.UUCP (Mark Plotnick) (12/30/86)

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