[smartcard] fix multi string conversion
This commit is contained in:
parent
a57c480b29
commit
58bc1ee4c9
@ -295,7 +295,7 @@ static DWORD filter_device_by_name_w(wLinkedList* list, LPWSTR* mszReaders, DWOR
|
||||
if (LinkedList_Count(list) < 1)
|
||||
return cchReaders;
|
||||
|
||||
readers = ConvertWCharNToUtf8Alloc(*mszReaders, cchReaders, NULL);
|
||||
readers = ConvertMszWCharNToUtf8Alloc(*mszReaders, cchReaders, NULL);
|
||||
|
||||
if (!readers)
|
||||
{
|
||||
|
@ -392,7 +392,7 @@ static char* smartcard_msz_dump_w(const WCHAR* msz, size_t len, char* buffer, si
|
||||
size_t szlen = 0;
|
||||
if (!msz)
|
||||
return NULL;
|
||||
char* sz = ConvertWCharNToUtf8Alloc(msz, len, &szlen);
|
||||
char* sz = ConvertMszWCharNToUtf8Alloc(msz, len, &szlen);
|
||||
if (!sz)
|
||||
return NULL;
|
||||
|
||||
|
@ -2006,7 +2006,7 @@ static LONG WINAPI PCSC_SCardStatus_Internal(SCARDHANDLE hCard, LPSTR mszReaderN
|
||||
if (unicode)
|
||||
{
|
||||
size_t size = 0;
|
||||
WCHAR* tmp = ConvertMszUtf8NToWCharAlloc(tReader, *pcchReaderLen, &size);
|
||||
WCHAR* tmp = ConvertMszUtf8NToWCharAlloc(tReader, pcsc_cchReaderLen + 1, &size);
|
||||
|
||||
if (tmp == NULL)
|
||||
{
|
||||
@ -2418,7 +2418,7 @@ static LONG WINAPI PCSC_SCardGetAttrib_FriendlyName(SCARDHANDLE hCard, DWORD dwA
|
||||
if (status != SCARD_S_SUCCESS)
|
||||
return status;
|
||||
|
||||
namePCSC = ConvertWCharNToUtf8Alloc(pbAttrW, *pcbAttrLen, NULL);
|
||||
namePCSC = ConvertMszWCharNToUtf8Alloc(pbAttrW, *pcbAttrLen, NULL);
|
||||
PCSC_SCardFreeMemory_Internal(hContext, pbAttrW);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user