Commit Graph

402 Commits

Author SHA1 Message Date
moneromooo-monero
58ee1f2bde
epee: fix invalid memory write reading an array entry
Reported by Lilith Wyatt at Talos.

Since this is not needed in normal operation, I just let this
error out.
2018-09-25 11:30:48 +00:00
moneromooo-monero
f61cd54465
epee: fix stack overflow on crafted input 2018-09-25 11:30:03 +00:00
moneromooo-monero
46b697feb4
abstract_tcp_server2: fix race on shutdown 2018-08-05 16:31:40 +00:00
moneromooo-monero
2daf54deeb
abstract_tcp_server2: fix use after free 2018-07-04 10:40:53 +01:00
moneromooo-monero
e5ac16b077
abstract_tcp_server2: restart async accept on error 2018-07-04 10:40:19 +01:00
stoffu
bea06d1a32
epee.string_tools: add conversion between UTF-8 and UTF-16 2018-07-04 10:40:16 +01:00
moneromooo-monero
d099dba9e1
epee: adaptive connection timeout system
a connection's timeout is halved for every extra connection
from the same host.

Also keep track of when we don't need to use a connection
anymore, so we can close it and free the resource for another
connection.

Also use the longer timeout for non routable local addresses.
2018-07-03 11:19:32 +01:00
moneromooo-monero
9c2f09df51
epee: fallback to a counter if gmtime fails when rotating logs 2018-07-03 11:19:25 +01:00
moneromooo-monero
1d3874dabf
epee: fix detection of 172.16.0.0/172.31.255.255 local IP range 2018-07-03 11:17:19 +01:00
moneromooo-monero
81e3926304
disable file size sanity check when loading the wallet cache 2018-07-03 11:17:11 +01:00
moneromooo-monero
5e2e003cfb
http_protocol_handler: limit the number of starting newlines 2018-05-31 12:17:54 +01:00
moneromooo-monero
fd9019b37d
abstract_tcp_server2: timeout on RPC connections 2018-05-31 12:17:52 +01:00
moneromooo-monero
ccaa666cf9
http_protocol_handler: speedup newline discarding 2018-05-31 12:17:50 +01:00
moneromooo-monero
ca7f0249eb
console_handler: fix start_default_console use of prompt parameter
It had not been updated to the function type change
2018-05-31 12:17:48 +01:00
Riccardo Spagni
ec439a9376
Merge pull request #3707
76817605 epee: Drop deprecated Boost.Thread header (Jan Beich)
2018-04-28 22:40:59 +02:00
Riccardo Spagni
6d8498be1f
Merge pull request #3704
e2b72da4 mlog: fix setting no logs (moneromooo-monero)
2018-04-28 22:40:28 +02:00
Jan Beich
76817605bd
epee: Drop deprecated Boost.Thread header
In file included from src/cryptonote_basic/hardfork.cpp:33:
In file included from src/blockchain_db/blockchain_db.h:42:
In file included from src/cryptonote_basic/hardfork.h:31:
contrib/epee/include/syncobj.h:37:10: fatal error: 'boost/thread/v2/thread.hpp' file not found
#include <boost/thread/v2/thread.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/rpc/daemon_handler.cpp:29:
In file included from src/rpc/daemon_handler.h:36:
In file included from src/p2p/net_node.h:41:
In file included from contrib/epee/include/net/levin_server_cp2.h:32:
In file included from contrib/epee/include/net/abstract_tcp_server2.h:324:
contrib/epee/include/net/abstract_tcp_server2.inl:44:10: fatal error: 'boost/thread/v2/thread.hpp' file not found
#include <boost/thread/v2/thread.hpp> // TODO
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

contrib/epee/include/math_helper.h: In member function 'bool epee::math_helper::average<val, default_base>::set_base()':
contrib/epee/include/syncobj.h:227:56: error: 'sleep_for' is not a member of 'boost::this_thread'
 #define  CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));}   epee::critical_region_t<decltype(x)>   critical_region_var(x)
                                                        ^
contrib/epee/include/syncobj.h:227:56: note: in definition of macro 'CRITICAL_REGION_LOCAL'
 #define  CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));}   epee::critical_region_t<decltype(x)>   critical_region_var(x)
                                                        ^~~~~~~~~
contrib/epee/include/syncobj.h:227:56: note: suggested alternative: 'sleep'
 #define  CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));}   epee::critical_region_t<decltype(x)>   critical_region_var(x)
                                                        ^
contrib/epee/include/syncobj.h:227:56: note: in definition of macro 'CRITICAL_REGION_LOCAL'
 #define  CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));}   epee::critical_region_t<decltype(x)>   critical_region_var(x)
                                                        ^~~~~~~~~
2018-04-25 22:23:42 +01:00
moneromooo-monero
e2b72da4ed
mlog: fix setting no logs 2018-04-25 20:42:31 +01:00
anonimal
c677421594
Build: remove UPnP definition from snap 2018-04-23 22:12:08 +00:00
Dimitris Apostolou
57c0b1ed9f Fix typos in various files 2018-03-15 18:25:38 +02:00
rbrunner7
430268224d Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windows 2018-02-25 12:57:58 +01:00
Riccardo Spagni
854a87d633
Merge pull request #3289
4789f859 wipeable_string: don't try to wipe an empty buffer (moneromooo-monero)
2018-02-20 17:48:16 +02:00
Riccardo Spagni
e3ad0c9ca6
Merge pull request #3243
2bc8c3db epee get_ns_count: cast to uint64_t before multiplying 10^9 to avoid overflow (stoffu)
2018-02-20 17:46:15 +02:00
moneromooo-monero
4789f8598f
wipeable_string: don't try to wipe an empty buffer
memset_s doesn't like it
2018-02-18 14:02:36 +00:00
stoffu
dfabc005d1
memwipe: add missing #include <stdio.h> 2018-02-17 01:06:05 +09:00
Riccardo Spagni
f4a6bc79d9
Merge pull request #3226
e4646379 keccak: fix mdlen bounds sanity checking (moneromooo-monero)
2e3e90ac pass large parameters by const ref, not value (moneromooo-monero)
61defd89 blockchain: sanity check number of precomputed hash of hash blocks (moneromooo-monero)
9af6b2d1 ringct: fix infinite loop in unused h2b function (moneromooo-monero)
8cea8d0c simplewallet: double check a new multisig wallet is multisig (moneromooo-monero)
9b98a6ac threadpool: catch exceptions in dtor, to avoid terminate (moneromooo-monero)
24803ed9 blockchain_export: fix buffer overflow in exporter (moneromooo-monero)
f3f7da62 perf_timer: rewrite to make it clear there is no division by zero (moneromooo-monero)
c6ea3df0 performance_tests: remove add_arg call stray extra param (moneromooo-monero)
fa6b4566 fuzz_tests: fix an uninitialized var in setup (moneromooo-monero)
03887f11 keccak: fix sanity check bounds test (moneromooo-monero)
ad11db91 blockchain_db: initialize m_open in base class ctor (moneromooo-monero)
bece67f9 miner: restore std::cout precision after modification (moneromooo-monero)
1aabd14c db_lmdb: check hard fork info drop succeeded (moneromooo-monero)
2018-02-16 14:26:58 +01:00
Riccardo Spagni
64fabf2eb7
Merge pull request #3252
f689a77e Fix #602 Turn on socket keepalive (Howard Chu)
2018-02-16 14:24:30 +01:00
Riccardo Spagni
0c71197892
Merge pull request #3217
fde4489e wipeable_string: call memwipe directly (moneromooo-monero)
2018-02-16 14:23:08 +01:00
Riccardo Spagni
666a76652b
Merge pull request #3187
851bd057 call _exit instead of abort in release mode (moneromooo-monero)
2018-02-16 14:20:31 +01:00
Howard Chu
f689a77e56
Fix #602 Turn on socket keepalive 2018-02-11 23:32:37 +00:00
stoffu
2bc8c3db5c
epee get_ns_count: cast to uint64_t before multiplying 10^9 to avoid overflow 2018-02-08 16:04:50 +09:00
moneromooo-monero
2e3e90acbe
pass large parameters by const ref, not value
Coverity 136394 136397 136409 136526 136529 136533 175302
2018-02-02 19:36:09 +00:00
moneromooo-monero
851bd057ec
call _exit instead of abort in release mode
Avoids cores being created, as they're nowadays often piped
to some call home system
2018-02-01 13:32:46 +00:00
moneromooo-monero
fde4489e1d
wipeable_string: call memwipe directly
since the original reason for the indirect call (that memwipe
was not in contrib) is now gone
2018-01-31 12:25:30 +00:00
Erik de Castro Lopo
8f30350d03 Fix method name in invoke_http_json_rpc
Previously, the method name was printed as an exmpty string because
the input string had already been moved with `std::move`.
2018-01-29 11:14:02 +11:00
Erik de Castro Lopo
32c0f908cd Allow the number of incoming connections to be limited
It was already possible to limit outgoing connections. One might want
to do this on home network connections with high bandwidth but low
usage caps.
2018-01-29 11:14:02 +11:00
Riccardo Spagni
76a6a794f9
Merge pull request #2969
95171614 Remove is_pod trait, and replace with is_standard_layout requirement (Lee Clagett)
2018-01-27 17:26:58 -08:00
Riccardo Spagni
baaeefdecc
Merge pull request #3098
935e39c7 levin_protocol_handler_async: erase from back of vector instead of front (stoffu)
2018-01-27 17:23:53 -08:00
xmr-eric
84a7f6a482 Readd copyright starting date 2018-01-26 10:03:20 -05:00
xmr-eric
18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
stoffu
935e39c7f3
levin_protocol_handler_async: erase from back of vector instead of front 2018-01-26 10:58:07 +09:00
Riccardo Spagni
fdb0a92f1b
Merge pull request #3155
21bd2157 remove unnecessary include (Jethro Grassie)
2018-01-25 16:52:12 -08:00
Riccardo Spagni
9fff66f004
Merge pull request #3012
e4bbeff2 epee: check some error return values (moneromooo-monero)
2018-01-25 16:36:27 -08:00
Jethro Grassie
21bd21576d
remove unnecessary include 2018-01-18 19:03:05 -05:00
Riccardo Spagni
d2ff91cb17
Merge pull request #3107
b7e5a70b epee: detect strptime, use std::get_time as fallback (moneromooo-monero)
2018-01-18 18:14:12 -05:00
Lee Clagett
951716146f Remove is_pod trait, and replace with is_standard_layout requirement 2018-01-18 02:26:19 -05:00
moneromooo-monero
b7e5a70bb1
epee: detect strptime, use std::get_time as fallback 2018-01-11 21:41:07 +00:00
Jethro Grassie
be1826c0fb
Keep readline optional 2018-01-11 13:51:13 -05:00
Riccardo Spagni
1c11ec71b5
Merge pull request #2995
6ccc51f6 wipeable_string: fix buffer overread (moneromooo-monero)
2018-01-10 11:53:42 +01:00
Riccardo Spagni
f9c66ba67c
Merge pull request #2990
2d17feb0 factor STL container serialization (moneromooo-monero)
2018-01-10 11:53:05 +01:00