msi: Handle out-of-memory condition in encode_streamname.

Hans Leidekker hans at codeweavers.com
Tue Feb 1 07:02:01 CST 2011


Might as well fix the original too.
---
 dlls/msi/table.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index e65e128..18fc000 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -156,7 +156,7 @@ LPWSTR encode_streamname(BOOL bTable, LPCWSTR in)
 
     if( !bTable )
         count = lstrlenW( in )+2;
-    out = msi_alloc( count*sizeof(WCHAR) );
+    if (!(out = msi_alloc( count*sizeof(WCHAR) ))) return NULL;
     p = out;
 
     if( bTable )
-- 
1.7.1






More information about the wine-patches mailing list