From: Luke D. <cod...@ho...> - 2002-06-20 01:44:52
|
----- Original Message ----- From: "Earnie Boyd" <ear...@ya...> To: <min...@li...> Sent: Wednesday, June 19, 2002 8:21 PM Subject: Re: [MinGW-dvlpr] Re: [Mingw-msys] MSYS problem with "non-standard" installation > > The real problem, though is that these functions assume a lot about the path > > to the MSYS DLL. The first step in __AbsDllPath() to remove the filename > > part should always work (though I am not 100% sure). The code to remove the > > "c:\" part is a suspicious: > > > > strcpy(buf2, &buf2[3]); > > > > Firstly, strcpy() is undefined for overlapping memory blocks. Also, I think > > the string could be a UNC path like "\\server\foo\bin", and according to the > > docs: > > > > "Windows NT/2000/XP: The path can have the prefix "\\?\", depending on how > > the module was loaded." > > > > I was aware of these other patterns and chose at the time not to deal > with them. Patches are welcome. > > Earnie. I was just thinking that since a file-mapping object name "can contain any character except the backslash character", what if we just got the entire path from AbsDllPath() and replaced backslashes with forward slashes, then used the result as part of the object name? I haven't tried it yet, but I just wanted to know what you thought. Luke |