msvcrt: Add implementation of _strncoll

Piotr Caban piotr.caban at gmail.com
Mon Nov 15 07:35:04 CST 2010


Hi,

+    char * nstr1 = HeapAlloc(GetProcessHeap(), 0, count + 1);
+    char * nstr2 = HeapAlloc(GetProcessHeap(), 0, count + 1);
+
+    memcpy(nstr1, str1, count + 1);
strncoll is used to compare at most count characters (you can't access 
data after nullbyte). You're not null terminating nstr1 and nstr2 strings.

This function should be implemented without memory allocations.

Cheers,
Piotr



More information about the wine-devel mailing list