Sender: nate AT cartsys DOT com Message-ID: <373C9538.C8FD838@cartsys.com> Date: Fri, 14 May 1999 14:27:20 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: GetShortPathName() or DLL support References: <373B5F02 DOT 6D1E949B AT unb DOT ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Endlisnis wrote: > > Eli Zaretskii wrote: > > > On Wed, 12 May 1999, Edward F. Sowell wrote: > > > MFC has a GetShortPathName() function that, obviously, converts a > > > path with long file names, spaces, etc to the 8.3 format. This is > > > often needed because some functions don't accept the funny file > > > names... e.g., spawnxx(). > > > > You don't need this in DJGPP: when you call `spawnXX', the DJGPP > > version automatically converts the long file name to the short one > > before passing it to DOS. > > That's not really 100% true. I haven't checked, but I'm guessing that > spawnXX just truncates to 8.3 format. What about NameNumericTail? Also, > there are ways to convince DOS 7.x to make a 8.3 filename that isn't just a > simple truncation or a numeric tail of a long filename. I don't think spawnXX > would work under these conditions. Perhaps you should consider checking before posting random speculations. Around line 180 of src/libc/dos/process/dosexec.c is a call to the DOS function to find the short alias of a long name. If you can devise an exploit where spawn fails, I'm sure djgpp-workers would like to know about it. -- Nate Eldredge nate AT cartsys DOT com