[PATCH] dwrite: fixed NULL ptr deref before check (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sun Sep 21 07:44:43 CDT 2014
1232723 Dereference before null check
---
dlls/dwrite/font.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index efa305e..6e7de46 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -390,9 +390,9 @@ static HRESULT WINAPI dwritefontface_TryGetFontTable(IDWriteFontFace *iface, UIN
TRACE("(%p)->(%u %p %p %p %p)\n", This, table_tag, table_data, table_size, context, exists);
table = heap_alloc(sizeof(struct dwrite_fonttable));
- table->magic = DWRITE_FONTTABLE_MAGIC;
if (!table)
return E_OUTOFMEMORY;
+ table->magic = DWRITE_FONTTABLE_MAGIC;
*exists = FALSE;
for (i = 0; i < This->data->file_count && !(*exists); i++)
--
1.8.4.5
More information about the wine-patches
mailing list