[PATCH] wbemprox: Use empty strings instead of NULL.

Rémi Bernon rbernon at codeweavers.com
Wed Aug 12 08:35:16 CDT 2020


For Win32_PhysicalMemory PartNumber and Serial properties.

Injustice 2 calls SysStringLen directly on the value without checking
its type.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---

The game also needs better media foundation, but it crashes on startup
because of this issue.

 dlls/wbemprox/builtin.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 4edda854b58..43268221936 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -2920,8 +2920,8 @@ static enum fill_status fill_physicalmemory( struct table *table, const struct e
     rec->devicelocator        = L"DIMM 0";
     rec->formfactor           = 8; /* DIMM */
     rec->memorytype           = 9; /* RAM */
-    rec->partnumber           = NULL;
-    rec->serial               = NULL;
+    rec->partnumber           = L"";
+    rec->serial               = L"";
     if (!match_row( table, row, cond, &status )) free_row_values( table, row );
     else row++;
 
-- 
2.28.0




More information about the wine-devel mailing list