FreeCOM example bug: command.c / executes everything
Eric Auer <[email protected]> Wed, 13 Nov 2002 21:06:03 +0100 (MET)
| Newsgroups | gmane.os.freedos.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I just noticed a very old bug still to exist.
In command.c of the most recent FreeCOM:
if (stricmp(strrchr(fullname, '.'), ".bat") == 0)
{
dprintf(("[BATCH: %s %s]\n", fullname, rest));
batch(fullname, first, rest);
}
else
/* exec the program */
... no tests at all if it is called .com or .exe ! ...
result = exec(fullname, rest, 0);
...
So if you accidentally tab-complete on program.txt and then hit enter,
a nice juicy crash will hit you back.
Eric