Menu

Commit [r823]  Maximize  Restore  History

Check that VerQueryValue returns a useful value.

tortoisesvn 2013-01-11

changed /trunk/src/AppUtils.cpp
/trunk/src/AppUtils.cpp Diff Switch to side-by-side view
--- a/trunk/src/AppUtils.cpp
+++ b/trunk/src/AppUtils.cpp
@@ -1,6 +1,6 @@
 // CommitMonitor - simple checker for new commits in svn repositories
 
-// Copyright (C) 2007-2010, 2012 - Stefan Kueng
+// Copyright (C) 2007-2010, 2012-2013 - Stefan Kueng
 
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License
@@ -466,8 +466,8 @@
                 (LPTSTR)strLangProductVersion,
                 (LPVOID *)&lpVersion,
                 &nInfoSize);
-
-            sVersion = (LPCTSTR)lpVersion;
+            if (nInfoSize && lpVersion)
+                sVersion = (LPCTSTR)lpVersion;
             free(pBuffer);
         }
     }
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.