16 Jan
2004
16 Jan
'04
11 p.m.
Uh oh.
Using MAX_PATH as an absolute turns out not to be safe.
WINE's docs have this to say in regards to CreateFile
Windows NT: You can use paths longer than MAX_PATH characters by calling the wide (W) version of CreateFile and prepending “\?\” to the path. The “\?\” tells the function to turn off path parsing. This lets you use paths that are nearly 32,000 Unicode characters long. You must use fully-qualified paths with this technique. This also works with UNC names. The “\?\” is ignored as part of the path.
IIRC, we have at least a few fixed buffers with MAX_PATH.
256 is a bit shy of 32767.
=-O