提交 b5581938 编写于 作者: J jp9000

win-wasapi: Fix potential null pointer deref in enumeration

上级 847b3013
......@@ -20,7 +20,7 @@ string GetDeviceName(IMMDevice *device)
PropVariantInit(&nameVar);
res = store->GetValue(PKEY_Device_FriendlyName, &nameVar);
if (SUCCEEDED(res)) {
if (SUCCEEDED(res) && nameVar.pwszVal && *nameVar.pwszVal) {
size_t len = wcslen(nameVar.pwszVal);
size_t size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册