Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!apple!claris!ames!oliveb!amiga!boing!dale From: dale@boing.UUCP (Dale Luck) Newsgroups: comp.windows.x Subject: simple bug in xlsfonts.c Message-ID: <420@boing.UUCP> Date: 5 Oct 88 06:04:53 GMT Reply-To: dale@boing.UUCP (Dale Luck) Distribution: na Organization: Boing, Milpitas, Ca. Lines: 61 Found this one after I finally got a qsort working on my system so I could link it successfully. VERSION: X11 release 2 CLIENT MACHINE: amiga 2000 CLIENT OPERATING SYSTEM: amigados DISPLAY: monochrome SYNOPSIS: Variable used before initialized. DESCRIPTION: The main program xlsfonts.c uses a variable called argcnt before initializing it. I guess most systems magically initialize the stack to all zeros. My test system initializes the stack to 0x55 to find these problems, and it does. REPEAT-BY: Run xlsfonts on a system that does not initialze the stack to zero. For instance, an amiga. FIX: *** /u/usr2/X11/clients/xlsfonts/xlsfonts.c Fri Sep 9 20:22:12 1988 --- xlsfonts.c Tue Oct 4 22:35:38 1988 *************** *** 41,47 **** int argc; char **argv; { ! int argcnt, i; INIT_NAME; --- 41,47 ---- int argc; char **argv; { ! int argcnt = 0, i; INIT_NAME; end of bug report boing!dale pyramid!amiga!dale uunet!cbmvax!amiga!dale -- Dale Luck Boing, Inc. {cbmvax|oliveb|pyramid}|!amiga!boing!dale Although I do contract work for Amiga-LosGatos, my opinions probably don't represent those of Commodore or its management or its engineers, but I think the world would be a better place if they did.