I was exploring what was making win2k's cmd.exe crash, and I had found a problem in GetFullPathName, so I wrote a test. AndiM nicly ran it for me in win98se. Andreas Mohr wrote:
Hi,
A:>fptest C:\ returned 3 and C:\ in buf, and 00000000 is the s pointer. C:\ returned 4 and C:\ in buf, and 00000000 is the s pointer. C:.. returned 3 and C:\ in buf, and 00000000 is the s pointer. C:\.. returned 4 and C:\ in buf, and 00000000 is the s pointer. C:\Program Files.. returned 3 and C:\ in buf, and 00000000 is the s ptr. C:\Program Files.. returned 4 and C:\ in buf, and 00000000 is the s ptr. C:\blargzool urned 14 and C:\blargazoool in buf, and 0073FCD3 is the s ptr.
HTH,
Andi
On the XP machine I have, C:\ returns C:\ and C:\.. returns C:\ I did not modify any code yet, but instead bring it up here as possibly something we need to have code that behaves differently to mimic different windows versions
-Dante
On Mon, 30 Dec 2002, Drew Ogle wrote:
I was exploring what was making win2k's cmd.exe crash, and I had found a problem in GetFullPathName, so I wrote a test.
[...]
I did not modify any code yet, but instead bring it up here as possibly something we need to have code that behaves differently to mimic different windows versions
There are many APIs that behave differently depending on the Windows version. However unless a real-world application depends on these differences Wine does not try to emulate all these differences.
What if we just implement the Windows XP behavior? Does this break anything?
Francois Gouget wrote:
On Mon, 30 Dec 2002, Drew Ogle wrote:
I was exploring what was making win2k's cmd.exe crash, and I had found a problem in GetFullPathName, so I wrote a test.
[ ... ]
What if we just implement the Windows XP behavior? Does this break anything?
This is unknown, but I took the following assumption from the tests; the original code was written in the w98 style, C:\ remains 4 char long. I would assume that the changing of C:\ to C:\ wouldn't majority break applications, but I don't know the way in which apps use the returns from this. It is possible that length could be checked, in which case things would break, but at least no buffer overflows will happen. So, I believe using the 2k/xp method would probably work.
-Dante