Date: Wed, 25 Oct 1995 20:36:53 -0500 (CDT) From: Aaron Ucko Subject: Re: GNAT-ADA-DOS bugs? To: cca AT mgl DOT ca Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Organization: Rockhurst College; Kansas City, MO >>your case) DOS blindly tries to interpret the beginning of the COFF >>file as the EXE header, which sometimes crashes your machine, sometimes > >Which shouldn't happen unless the very first two bytes in the coff file >were "MZ" and what are the chances that a coff file will have DOS' >magic number for .EXEs in the proper spot? Which is what makes things even worse. DOS actually treats COMs and EXEs equally, trying to parse an EXE header if the first two bytes are 'M' and 'Z' (not necessarily in that order!) and just executing the contents of the file as raw code otherwise. -- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) | httyp! "That's right," he said. "We're philosophers. We think, therefore we am." -- Terry Pratchett, _Small Gods_ | Geek Code 3.1 [for explanation, finger hayden AT mankato DOT msus DOT edu]: GCS/M/S/C d- s: a17 C++(+++)>++++ UL++>++++ P++ L++>+++++ E- W(-) N++(+) o+ K- w--- O M@ V-(--) PS++(+++) PE- Y(+) PGP(+) t(+) !5 X-- R(-) tv-@ b++(+++) DI+ !D-- G++(+++) e->+++++(*) h!>+ r-(--)>+++ y?