[PATCH] dwrite: initialize a variable (Coverity)

Marcus Meissner marcus at jet.franken.de
Sun Nov 30 03:45:16 CST 2014


The first goto done; exit path has "cache" uninitialized.

1248123 Uninitialized pointer read
---
 dlls/dwrite/analyzer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
index 3670e46..17e0351 100644
--- a/dlls/dwrite/analyzer.c
+++ b/dlls/dwrite/analyzer.c
@@ -845,7 +845,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
 {
     const struct dwritescript_properties *scriptprops;
     struct scriptshaping_context context;
-    struct scriptshaping_cache *cache;
+    struct scriptshaping_cache *cache = NULL;
     WCHAR *string;
     BOOL update_cluster;
     UINT32 i, g;
-- 
1.8.4.5




More information about the wine-patches mailing list