From fd6e6fe5c429fb1210e9ef55da0870495d066ca6 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Wed, 16 Sep 2015 13:49:46 -0600
Subject: msi: Return an error when MsiDatabaseImport is passed an invalid
 pathname.

Signed-off-by: Erich E. Hoover <erich.e.hoover@wine-staging.com>
---
 dlls/msi/database.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index 32e5a63..e28cf1c 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -780,6 +780,8 @@ static UINT MSI_DatabaseImport(MSIDATABASE *db, LPCWSTR folder, LPCWSTR file)
     lstrcatW( path, file );
 
     data = msi_read_text_archive( path, &len );
+    if (data == NULL)
+        return ERROR_BAD_PATHNAME;
 
     ptr = data;
     msi_parse_line( &ptr, &columns, &num_columns, &len );
-- 
2.5.1

