According to MSDN the GetVolumeInformation() expects the 'nVolumeNameSize'
and 'nFileSystemNameSize' parameters to be size in TCHARs. The Dokan
however passes size in bytes.
dokan/volume.c:
status = DokanOperations->GetVolumeInformation(
volumeName, // VolumeNameBuffer
sizeof(volumeName), <== // VolumeNameSize
&volumeSerial, // VolumeSerialNumber
&maxComLength, // MaximumComponentLength
&fsFlags, // FileSystemFlags
fsName, // FileSystemNameBuffer
sizeof(fsName), <== // FileSystemNameSize
FileInfo
);
As a result, attempt to return more than MAX_PATH chars causes memory
corruption.
Original issue reported on code.google.com by iry...@gmail.com on 1 May 2009 at 4:52
Original issue reported on code.google.com by
iry...@gmail.com
on 1 May 2009 at 4:52