[Winpt-commits] r419 - trunk/Src

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Sat Mar 3 20:56:06 CET 2012


Author: twoaday
Date: 2012-03-03 20:56:06 +0100 (Sat, 03 Mar 2012)
New Revision: 419

Modified:
   trunk/Src/ChangeLog
   trunk/Src/WinPT.cpp
   trunk/Src/versioninfo.rc
   trunk/Src/wptCurrWnd.cpp
Log:
2012-03-03  Timo Schulz  <twoaday at gmx.net>

        * WinPT.cpp (get_file_version): Improved error checking.
	(gpg_set_debug_mode): Likewise.
		


Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog	2012-02-26 17:57:33 UTC (rev 418)
+++ trunk/Src/ChangeLog	2012-03-03 19:56:06 UTC (rev 419)
@@ -1,3 +1,8 @@
+2012-03-03  Timo Schulz  <twoaday at gmx.net>
+
+        * WinPT.cpp (get_file_version): Improved error checking.
+	(gpg_set_debug_mode): Likewise.
+	
 2012-02-26  Timo Schulz  <twoaday at gmx.net>
 
         * WinPT.cpp (WinMain): Check for possible errors

Modified: trunk/Src/WinPT.cpp
===================================================================
--- trunk/Src/WinPT.cpp	2012-02-26 17:57:33 UTC (rev 418)
+++ trunk/Src/WinPT.cpp	2012-03-03 19:56:06 UTC (rev 419)
@@ -58,7 +58,7 @@
 {
     VS_FIXEDFILEINFO *inf;
     char file[MAX_PATH+1] = {0};
-    LPVOID buf, data;
+    LPVOID buf, data = NULL;
     UINT qlen = 0;
 
     strncpy (file, fname, MAX_PATH);
@@ -76,8 +76,7 @@
 	goto fail;
     }
     
-    VerQueryValue (buf, (char*)"\\", &data, &qlen);
-    if (!qlen) {
+    if (!VerQueryValue (buf, (char*)"\\", &data, &qlen) || !qlen) {
 	err = -1;
 	goto fail;
     }
@@ -104,7 +103,7 @@
     memset (&rcs, 0, sizeof (rcs));
     rcs.kring_update = 1;
     int err = DialogBoxParam (glob_hinst, (LPCSTR)IDD_WINPT_KEYCACHE, hwnd,
-		    keycache_dlg_proc, (LPARAM)&rcs);
+			      keycache_dlg_proc, (LPARAM)&rcs);
     if (err) {
 	char *cfgf = get_gnupg_config ();
 	if (cfgf && check_gnupg_options (cfgf, 0) == WPTERR_FILE_EXIST)
@@ -125,10 +124,11 @@
     
     /* XXX: no gpgme.dbg is created. */
     if (val > 0) {
-	char tmp[128];
-	GetTempPath (DIM (tmp)-1, tmp);
-	_snprintf (buf, DIM (buf)-1, "GPGME_DEBUG=5:%sgpgme.dbg", tmp);
-	putenv (buf);
+	char tmp[MAX_PATH+1];
+	if (GetTempPath (DIM (tmp)-1, tmp) > 0) {	    
+	    _snprintf (buf, DIM (buf)-1, "GPGME_DEBUG=5:%sgpgme.dbg", tmp);
+	    putenv (buf);
+	}
     }
     else
 	putenv ("GPGME_DEBUG=");

Modified: trunk/Src/versioninfo.rc
===================================================================
--- trunk/Src/versioninfo.rc	2012-02-26 17:57:33 UTC (rev 418)
+++ trunk/Src/versioninfo.rc	2012-03-03 19:56:06 UTC (rev 419)
@@ -15,8 +15,8 @@
 #line __LINE__ "versioninfo.rc.in"
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,5,1,0
- PRODUCTVERSION 1,5,1,0
+ FILEVERSION 1,5,2,0
+ PRODUCTVERSION 1,5,2,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -34,15 +34,15 @@
             VALUE "Comments", "This is Free Software under the terms of the GNU GPL v2\0"
             VALUE "CompanyName", "\0"
             VALUE "FileDescription", "Windows Privacy Tray (WinPT)\0"
-            VALUE "FileVersion", "1.5.1-svn\0"
+            VALUE "FileVersion", "1.5.2\0"
             VALUE "InternalName", "WinPT\0"
             VALUE "LegalCopyright", " Copyright (C) 2012 Timo Schulz\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "WinPT.exe\0"
             VALUE "PrivateBuild", "\0"
             VALUE "ProductName", "Windows Privacy Tray\0"
-            VALUE "ProductVersion", "1.5.1-svn\0"
-            VALUE "SpecialBuild", "2012-02-06T20:18+0100\0"
+            VALUE "ProductVersion", "1.5.2\0"
+            VALUE "SpecialBuild", "2012-02-26T18:57+0100\0"
         END
     END
     BLOCK "VarFileInfo"

Modified: trunk/Src/wptCurrWnd.cpp
===================================================================
--- trunk/Src/wptCurrWnd.cpp	2012-02-26 17:57:33 UTC (rev 418)
+++ trunk/Src/wptCurrWnd.cpp	2012-03-03 19:56:06 UTC (rev 419)
@@ -1,5 +1,5 @@
 /* wptCurrWnd.cpp - Current window code
- *	Copyright (C) 2001-2004, 2006, 2007, 2011 Timo Schulz
+ *	Copyright (C) 2001-2004, 2006, 2007, 2011-2012 Timo Schulz
  *
  * This file is part of WinPT.
  *



More information about the Winpt-commits mailing list