Check smartcard_convert_string_list for NULL string

In #6821 it has been reported that there are buggy smartcard
drivers that report a string size but fail to allocate the string
itself. This check avoids a crash with such input parameters
This commit is contained in:
akallabeth 2021-03-09 09:22:39 +01:00 committed by akallabeth
parent 5fc2290c03
commit 4599dc0a60

View File

@ -349,6 +349,9 @@ static char* smartcard_convert_string_list(const void* in, size_t bytes, BOOL un
if (bytes < 1)
return NULL;
if (in == NULL)
return NULL;
if (unicode)
{
length = (bytes / sizeof(WCHAR)) - 1;