Alexandre Julliard : winecfg: Fix potential null pointer access ( spotted by Yaroslav Skorokhodov).

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jun 12 06:30:35 CDT 2007


Module: wine
Branch: master
Commit: 78bdd9ba94f4b5e96d8aebc215bec7c4659d228a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=78bdd9ba94f4b5e96d8aebc215bec7c4659d228a

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jun 11 20:20:39 2007 +0200

winecfg: Fix potential null pointer access (spotted by Yaroslav Skorokhodov).

---

 programs/winecfg/appdefaults.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/programs/winecfg/appdefaults.c b/programs/winecfg/appdefaults.c
index ed61f9d..1df045e 100644
--- a/programs/winecfg/appdefaults.c
+++ b/programs/winecfg/appdefaults.c
@@ -107,7 +107,7 @@ static void update_comboboxes(HWND dialog)
     winver = get_reg_key(config_key, keypath(""), "Version", "");
     ver = get_registry_version();
 
-    if (*winver == '\0')
+    if (!winver || !winver[0])
     {
         HeapFree(GetProcessHeap(), 0, winver);
 




More information about the wine-cvs mailing list