Used-before-set error in /etc/dmesg

der Mouse mouse at mcgill-vision.UUCP
Mon Feb 1 19:39:20 AEST 1988


Description:
	/etc/dmesg has a used-before-set problem.

Repeat-By:
	Inspect the code, or, relink dmesg with a run-time system that
	happens to leave nonzero trash on the stack where `ignore' gets
	allocated.

	This implies a bug in lint, too, for this elicits no `may be
	used before set' messages from lint.

Fix:
	*** dmesg.c.old	Thu Feb 20 14:29:45 1986
	--- dmesg.c	Mon Feb  1 04:32:35 1988
	***************
	*** 90,95 ****
	--- 90,96 ----
	  	mp = mstart;
	  	pdate();
	  	sawnl = 1;
	+ 	ignore = 0;
	  	do {
	  		if (sawnl && *mp == '<')
	  			ignore = 1;

					der Mouse

			uucp: mouse at mcgill-vision.uucp
			arpa: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.bugs.4bsd.ucb-fixes mailing list