This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gamin-0.1.7


Lapo Luchini wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yaakov S (Cygwin Ports) wrote:
static int gamin_check_not_fat (void)

Nice.


if (strcmp(fsname, "FAT") == 0)

Had to change this to a strncmp(, , 3), but otherwise works perfectly.

Seeing this and the messages about string vulnerabilities that are floating around, I thought I'd have a closer look at the function.

Turns out the code is fine. However note that this will only work on
2000/XP and greater. GetVolumePathName is only available when
_WIN32_WINNT>=0x500

9x, ME and NT will either need to figure out the root directory of the
volume some other way, or just CD to winpath and call GetVolumeInformation.


Dave



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]