Skip to content

Commit

Permalink
Merge pull request #202 from ZencashOfficial/hotfix-2.0.19-1
Browse files Browse the repository at this point in the history
 * v2.0.19-1: Hotfix of CVE-2017-18350
  • Loading branch information
cronicc committed Nov 8, 2019
2 parents 7827af0 + bba2adc commit 6d93211
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Zen 2.0.19
Zen 2.0.19-1
==============

What is Horizen?
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 19)
define(_CLIENT_VERSION_BUILD, 50)
define(_CLIENT_VERSION_BUILD, 51)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down
6 changes: 3 additions & 3 deletions doc/man/zen-cli.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH ZEN-CLI "1" "October 2019" "zen-cli v2.0.19" "User Commands"
.TH ZEN-CLI "1" "November 2019" "zen-cli v2.0.19-1" "User Commands"
.SH NAME
zen-cli \- manual page for zen-cli v2.0.19
zen-cli \- manual page for zen-cli v2.0.19-1
.SH DESCRIPTION
Horizen RPC client version v2.0.19
Horizen RPC client version v2.0.19-1
.SS "Usage:"
.TP
zen\-cli [options] <command> [params]
Expand Down
6 changes: 3 additions & 3 deletions doc/man/zen-tx.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH ZEN-TX "1" "October 2019" "zen-tx v2.0.19" "User Commands"
.TH ZEN-TX "1" "November 2019" "zen-tx v2.0.19-1" "User Commands"
.SH NAME
zen-tx \- manual page for zen-tx v2.0.19
zen-tx \- manual page for zen-tx v2.0.19-1
.SH DESCRIPTION
Zencash zen\-tx utility version v2.0.19
Zencash zen\-tx utility version v2.0.19-1
.SS "Usage:"
.TP
zen\-tx [options] <hex\-tx> [commands]
Expand Down
8 changes: 4 additions & 4 deletions doc/man/zend.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH ZEND "1" "October 2019" "zend v2.0.19" "User Commands"
.TH ZEND "1" "November 2019" "zend v2.0.19-1" "User Commands"
.SH NAME
zend \- manual page for zend v2.0.19
zend \- manual page for zend v2.0.19-1
.SH DESCRIPTION
Zen Daemon version v2.0.19
Zen Daemon version v2.0.19-1
.SS "Usage:"
.TP
zend [options]
Expand Down Expand Up @@ -51,7 +51,7 @@ Specify data directory
\fB\-disabledeprecation=\fR<version>
.IP
Disable block\-height node deprecation and automatic shutdown (example:
\fB\-disabledeprecation\fR=\fI\,2\/\fR.0.19)
\fB\-disabledeprecation\fR=\fI\,2\/\fR.0.19-1)
.HP
\fB\-exportdir=\fR<dir>
.IP
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 19
#define CLIENT_VERSION_BUILD 50
#define CLIENT_VERSION_BUILD 51

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
12 changes: 6 additions & 6 deletions src/netbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ struct timeval MillisToTimeval(int64_t nTimeout)
*
* @note This function requires that hSocket is in non-blocking mode.
*/
bool static InterruptibleRecv(char* data, size_t len, int timeout, SOCKET& hSocket)
bool static InterruptibleRecv(uint8_t* data, size_t len, int timeout, SOCKET& hSocket)
{
int64_t curTime = GetTimeMillis();
int64_t endTime = curTime + timeout;
Expand Down Expand Up @@ -316,7 +316,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
CloseSocket(hSocket);
return error("Error sending to proxy");
}
char pchRet1[2];
uint8_t pchRet1[2];
if (!InterruptibleRecv(pchRet1, 2, SOCKS5_RECV_TIMEOUT, hSocket)) {
CloseSocket(hSocket);
return error("Error reading proxy response");
Expand All @@ -341,7 +341,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
return error("Error sending authentication to proxy");
}
LogPrint("proxy", "SOCKS5 sending proxy authentication %s:%s\n", auth->username, auth->password);
char pchRetA[2];
uint8_t pchRetA[2];
if (!InterruptibleRecv(pchRetA, 2, SOCKS5_RECV_TIMEOUT, hSocket)) {
CloseSocket(hSocket);
return error("Error reading proxy authentication response");
Expand Down Expand Up @@ -370,7 +370,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
CloseSocket(hSocket);
return error("Error sending to proxy");
}
char pchRet2[4];
uint8_t pchRet2[4];
if (!InterruptibleRecv(pchRet2, 4, SOCKS5_RECV_TIMEOUT, hSocket)) {
CloseSocket(hSocket);
return error("Error reading proxy response");
Expand Down Expand Up @@ -398,7 +398,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
CloseSocket(hSocket);
return error("Error: malformed proxy response");
}
char pchRet3[256];
uint8_t pchRet3[256];
switch (pchRet2[3])
{
case 0x01: ret = InterruptibleRecv(pchRet3, 4, SOCKS5_RECV_TIMEOUT, hSocket); break;
Expand All @@ -410,7 +410,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
CloseSocket(hSocket);
return error("Error reading from proxy");
}
int nRecv = pchRet3[0];
size_t nRecv = pchRet3[0];
ret = InterruptibleRecv(pchRet3, nRecv, SOCKS5_RECV_TIMEOUT, hSocket);
break;
}
Expand Down

0 comments on commit 6d93211

Please sign in to comment.