Module: wine
Branch: master
Commit: b46ab0b8cb19c7728397b0a5865a1d4f0f5a63c8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b46ab0b8cb19c7728397b0a58…
Author: Aric Stewart <aric(a)codeweavers.com>
Date: Thu Apr 12 14:46:43 2007 +0900
msi: Do not crash in MsiGetUserInfo if org, user or serial are not present, instead return USERINFOSTATE_ABSENT.
---
dlls/msi/msi.c | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 2cb4848..ae67b75 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -1562,15 +1562,29 @@ static USERINFOSTATE WINAPI MSI_GetUserInfo(LPCWSTR szProduct,
state = USERINFOSTATE_PRESENT;
- r = msi_strcpy_to_awstring( user, lpUserNameBuf, pcchUserNameBuf );
- if (r == ERROR_MORE_DATA)
- state = USERINFOSTATE_MOREDATA;
- r = msi_strcpy_to_awstring( org, lpOrgNameBuf, pcchOrgNameBuf );
- if (r == ERROR_MORE_DATA)
- state = USERINFOSTATE_MOREDATA;
- r = msi_strcpy_to_awstring( serial, lpSerialBuf, pcchSerialBuf );
- if (r == ERROR_MORE_DATA)
- state = USERINFOSTATE_MOREDATA;
+ if (user)
+ {
+ r = msi_strcpy_to_awstring( user, lpUserNameBuf, pcchUserNameBuf );
+ if (r == ERROR_MORE_DATA)
+ state = USERINFOSTATE_MOREDATA;
+ }
+ else
+ state = USERINFOSTATE_ABSENT;
+ if (org)
+ {
+ r = msi_strcpy_to_awstring( org, lpOrgNameBuf, pcchOrgNameBuf );
+ if (r == ERROR_MORE_DATA && state == USERINFOSTATE_PRESENT)
+ state = USERINFOSTATE_MOREDATA;
+ }
+ /* msdn states: The user information is considered to be present even in the absence of a company name. */
+ if (serial)
+ {
+ r = msi_strcpy_to_awstring( serial, lpSerialBuf, pcchSerialBuf );
+ if (r == ERROR_MORE_DATA && state == USERINFOSTATE_PRESENT)
+ state = USERINFOSTATE_MOREDATA;
+ }
+ else
+ state = USERINFOSTATE_ABSENT;
msi_free( user );
msi_free( org );
Module: wine
Branch: master
Commit: 4da1d2ae04683c0d5f3b6d1768b8acb673fc4be3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4da1d2ae04683c0d5f3b6d176…
Author: Detlef Riekenberg <wine.dev(a)web.de>
Date: Wed Apr 11 23:16:26 2007 +0200
localui: Add version resource.
---
.gitignore | 1 +
dlls/localui/Makefile.in | 2 ++
dlls/localui/localui.rc | 37 +++++++++++++++++++++++++++++++++++++
3 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
index c2709e8..6ac3e49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -282,6 +282,7 @@ dlls/localspl/localspl.res
dlls/localspl/tests/*.ok
dlls/localspl/tests/localspl_crosstest.exe
dlls/localspl/tests/testlist.c
+dlls/localui/localui.res
dlls/localui/tests/*.ok
dlls/localui/tests/localui_crosstest.exe
dlls/localui/tests/testlist.c
diff --git a/dlls/localui/Makefile.in b/dlls/localui/Makefile.in
index 7505c15..f002e23 100644
--- a/dlls/localui/Makefile.in
+++ b/dlls/localui/Makefile.in
@@ -8,6 +8,8 @@ IMPORTS = kernel32
C_SRCS = \
localui.c
+RC_SRCS = localui.rc
+
@MAKE_DLL_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/localui/localui.rc b/dlls/localui/localui.rc
new file mode 100644
index 0000000..5162b6e
--- /dev/null
+++ b/dlls/localui/localui.rc
@@ -0,0 +1,37 @@
+/*
+ * Top level resource file for localui
+ *
+ * Copyright 2007 Detlef Riekenberg
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ */
+
+#include "windef.h"
+#include "winbase.h"
+#include "winver.h"
+
+
+#define WINE_FILENAME_STR "localui.dll"
+#define WINE_FILEDESCRIPTION_STR "User Interface for the Local Monitor"
+
+/* Same Version as WinXP_sp2 */
+#define WINE_FILEVERSION 5,1,2600,2180
+#define WINE_FILEVERSION_STR "5.1.2600.2180"
+
+#define WINE_PRODUCTVERSION 5,1,2600,2180
+#define WINE_PRODUCTVERSION_STR "5.1.2600.2180"
+
+#include "wine/wine_common_ver.rc"