mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user