Remove embedded null from PDO name
@@ -677,6 +677,11 @@ PPH_STRING PhGetPnPDeviceName(
else
deviceDesc = PhCreateString2(&displayDesc);
+ if (deviceName->Length >= sizeof(UNICODE_NULL) && deviceName->Buffer[deviceName->Length / sizeof(WCHAR)] == UNICODE_NULL)
+ deviceName->Length -= sizeof(UNICODE_NULL); // PhTrimToNullTerminatorString(deviceName);
+ if (deviceDesc->Length >= sizeof(UNICODE_NULL) && deviceDesc->Buffer[deviceDesc->Length / sizeof(WCHAR)] == UNICODE_NULL)
+ deviceDesc->Length -= sizeof(UNICODE_NULL); // PhTrimToNullTerminatorString(deviceDesc);
+
if (!PhIsNullOrEmptyString(deviceDesc))
{
PH_FORMAT format[4];
