Ver código fonte

Issue 2407 – Failure when opening site imported from PuTTY with unsupported SSH proxy

https://winscp.net/tracker/2407
(cherry picked from commit ff1fb558c520b71c3800383ea5f500276df67365)

Source commit: 4b829d429b5a4f01bef8ff3b7512f2e3bc7a026f
Martin Prikryl 4 dias atrás
pai
commit
94fa2239f2
2 arquivos alterados com 4 adições e 2 exclusões
  1. 3 2
      source/core/SessionInfo.cpp
  2. 1 0
      source/putty/proxy/proxy.c

+ 3 - 2
source/core/SessionInfo.cpp

@@ -1107,7 +1107,8 @@ UnicodeString __fastcall TSessionLog::GetCmdLineLog(TConfiguration * AConfigurat
 template <typename T>
 UnicodeString __fastcall EnumName(T Value, UnicodeString Names)
 {
-  int N = int(Value);
+  int ValueI = int(Value);
+  int N = ValueI;
 
   do
   {
@@ -1120,7 +1121,7 @@ UnicodeString __fastcall EnumName(T Value, UnicodeString Names)
   }
   while ((N >= 0) && !Names.IsEmpty());
 
-  return L"(unknown)";
+  return FORMAT(L"(unknown %d)", (ValueI));
 }
 #define ADSTR(S) AddLogEntry(S)
 #define ADF(S, F) ADSTR(FORMAT(S, F));

+ 1 - 0
source/putty/proxy/proxy.c

@@ -575,6 +575,7 @@ Socket *new_connection(SockAddr *addr, const char *hostname,
 
         #ifdef WINSCP
         ps->proxy_addr = NULL;
+        ps->pn = NULL;
         #endif
 
         /*