kernel32: Tiny improvement to the GetVolumePathNameW stub

Michael Karcher wine at mkarcher.dialup.fu-berlin.de
Sat Aug 16 12:33:55 CDT 2008


Am Samstag, den 16.08.2008, 17:12 +0000 schrieb Louis. Lenders:
> Hi,  this fixes Adobe Lightroom 2.0 start up bug, mentioned in 
> http://bugs.winehq.org/show_bug.cgi?id=8224#c4
> 
> as long wine doesn't handle with volume mount points, it's probably
> safe to satisfy most apps.

The idea of your patch looks right to me. But (1) please don't use
memcmp to compare wide characters, especially, don't use memcmp with a
count of one, as it only compares one half the the wide character. use
  filename[1] == ':' && filename[2] == '\\'
instead. (2) Please check that filename really has at least 3 characters
before accessing it. (3)Please check the size of the output buffer
before copying anything into it.

Finally, the chance of getting this patch accepted raises if you
accompany the implementation with an API test. Another point to increase
the chances of getting that patch committed is to implement the corner
cases (at least the empty string) explained on MSDN, also backed up by
an API test. Please also note the documented behaviour for the case of
the output buffer being short by one byte.

Regards,
  Michael Karcher





More information about the wine-devel mailing list