Detlef Riekenberg : localspl: Replace number with a defined value ( static buffer size).

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 16 08:01:02 CST 2006


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

Author: Detlef Riekenberg <wine.dev at web.de>
Date:   Wed Nov 15 21:02:26 2006 +0100

localspl: Replace number with a defined value (static buffer size).

---

 dlls/localspl/localmon.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/localspl/localmon.c b/dlls/localspl/localmon.c
index b50c90f..72b6b35 100644
--- a/dlls/localspl/localmon.c
+++ b/dlls/localspl/localmon.c
@@ -83,8 +83,8 @@ static DWORD get_ports_from_reg(DWORD le
     LPWSTR  ptr;
     LPPORT_INFO_2W out;
     WCHAR   portname[MAX_PATH];
-    WCHAR   res_PortW[32];
-    WCHAR   res_MonitorW[32];
+    WCHAR   res_PortW[IDS_LOCALPORT_MAXLEN];
+    WCHAR   res_MonitorW[IDS_LOCALMONITOR_MAXLEN];
     INT     reslen_PortW;
     INT     reslen_MonitorW;
     DWORD   len;
@@ -113,8 +113,8 @@ static DWORD get_ports_from_reg(DWORD le
     }
 
     /* "+1" for '\0' */
-    reslen_MonitorW = LoadStringW(LOCALSPL_hInstance, IDS_LOCALMONITOR, res_MonitorW, 32) + 1;  
-    reslen_PortW = LoadStringW(LOCALSPL_hInstance, IDS_LOCALPORT, res_PortW, 32) + 1;  
+    reslen_MonitorW = LoadStringW(LOCALSPL_hInstance, IDS_LOCALMONITOR, res_MonitorW, IDS_LOCALMONITOR_MAXLEN) + 1;  
+    reslen_PortW = LoadStringW(LOCALSPL_hInstance, IDS_LOCALPORT, res_PortW, IDS_LOCALPORT_MAXLEN) + 1;  
 
     res = RegOpenKeyW(HKEY_LOCAL_MACHINE, WinNT_CV_PortsW, &hroot);
     if (res == ERROR_SUCCESS) {




More information about the wine-cvs mailing list