Skip to content

Commit f16cdb0

Browse files
authored
fix typo in max_frame_lenght (#943)
1 parent 851e232 commit f16cdb0

File tree

2 files changed

+158
-4
lines changed

2 files changed

+158
-4
lines changed

cita-network/src/p2p_protocol/transfer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use tokio::codec::length_delimited::LengthDelimitedCodec;
3232
// Quota (1 byte) = 200,
3333
// Max 20 block in one transfer.
3434
// 512M can support BQL set to 2 ** 32 - 1
35-
pub const MAX_FRAME_LENGTH: usize = 512 * 1024 * 1204;
35+
pub const MAX_FRAME_LENGTH: usize = 512 * 1024 * 1024;
3636
pub const TRANSFER_PROTOCOL_ID: ProtocolId = ProtocolId::new(1);
3737

3838
struct TransferProtocol {

scripts/security_audit.sh

Lines changed: 157 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ fi
1515
echo "[Info_] Run Security Audit."
1616
# TODO: fix audit error
1717
: "
18+
Crate: arc-swap
19+
Version: 0.4.4
20+
Title: Dangling reference in access::Map with Constant
21+
Date: 2020-12-10
22+
ID: RUSTSEC-2020-0091
23+
URL: https://rustsec.org/advisories/RUSTSEC-2020-0091
24+
Solution: Upgrade to >=1.1.0 OR >=0.4.8
25+
Dependency tree:
26+
arc-swap 0.4.4
27+
1828
Crate: bumpalo
1929
Version: 3.2.0
2030
Title: Flaw in realloc allows reading unknown memory
@@ -87,6 +97,107 @@ libsecp256k1 0.2.2
8797
│ └── cita-chain 20.2.0
8898
└── cita-executor 20.2.0
8999
100+
Crate: ordered-float
101+
Version: 1.0.2
102+
Title: ordered_float:NotNan may contain NaN after panic in assignment operators
103+
Date: 2020-12-06
104+
ID: RUSTSEC-2020-0082
105+
URL: https://rustsec.org/advisories/RUSTSEC-2020-0082
106+
Solution: Upgrade to >=1.1.1, <2.0.0 OR >=2.0.1
107+
Dependency tree:
108+
ordered-float 1.0.2
109+
└── serde-value 0.5.3
110+
└── log4rs 0.8.3
111+
└── cita-logger 0.1.1
112+
├── util 0.6.0
113+
│ ├── tx_pool 0.6.0
114+
│ │ └── cita-auth 20.2.0
115+
│ ├── engine 0.6.0
116+
│ │ └── cita-bft 20.2.0
117+
│ ├── core-executor 0.1.0
118+
│ │ └── cita-executor 20.2.0
119+
│ ├── core 0.1.0
120+
│ │ ├── core-executor 0.1.0
121+
│ │ ├── cita-relayer-parser 0.1.0
122+
│ │ └── cita-chain 20.2.0
123+
│ ├── common-types 0.1.0
124+
│ │ ├── core-executor 0.1.0
125+
│ │ ├── core 0.1.0
126+
│ │ ├── cita-executor 20.2.0
127+
│ │ └── cita-chain 20.2.0
128+
│ ├── cita-network 20.2.0
129+
│ ├── cita-jsonrpc 20.2.0
130+
│ ├── cita-forever 1.0.0
131+
│ ├── cita-executor 20.2.0
132+
│ ├── cita-chain 20.2.0
133+
│ ├── cita-bft 20.2.0
134+
│ └── cita-auth 20.2.0
135+
├── libproto 0.6.0
136+
│ ├── tx_pool 0.6.0
137+
│ ├── proof 0.6.0
138+
│ │ ├── jsonrpc-proto 0.1.0
139+
│ │ │ └── cita-jsonrpc 20.2.0
140+
│ │ ├── core-executor 0.1.0
141+
│ │ ├── core 0.1.0
142+
│ │ ├── common-types 0.1.0
143+
│ │ ├── cita-executor 20.2.0
144+
│ │ ├── cita-chain 20.2.0
145+
│ │ ├── cita-bft 20.2.0
146+
│ │ └── chain-executor-mock 0.1.0
147+
│ ├── jsonrpc-proto 0.1.0
148+
│ ├── create-genesis 0.1.0
149+
│ ├── core-executor 0.1.0
150+
│ ├── core 0.1.0
151+
│ ├── common-types 0.1.0
152+
│ ├── cita-relayer-parser 0.1.0
153+
│ ├── cita-network 20.2.0
154+
│ ├── cita-jsonrpc 20.2.0
155+
│ ├── cita-executor 20.2.0
156+
│ ├── cita-chain 20.2.0
157+
│ ├── cita-bft 20.2.0
158+
│ ├── cita-auth 20.2.0
159+
│ └── chain-executor-mock 0.1.0
160+
├── jsonrpc-proto 0.1.0
161+
├── core-executor 0.1.0
162+
├── core 0.1.0
163+
├── common-types 0.1.0
164+
├── cita-relayer-parser 0.1.0
165+
├── cita-network 20.2.0
166+
├── cita-jsonrpc 20.2.0
167+
├── cita-forever 1.0.0
168+
├── cita-executor 20.2.0
169+
├── cita-database 0.1.0
170+
│ ├── core-executor 0.1.0
171+
│ ├── core 0.1.0
172+
│ ├── common-types 0.1.0
173+
│ ├── cita-executor 20.2.0
174+
│ ├── cita-chain 20.2.0
175+
│ └── cita-auth 20.2.0
176+
├── cita-chain 20.2.0
177+
├── cita-bft 20.2.0
178+
├── cita-auth 20.2.0
179+
└── chain-executor-mock 0.1.0
180+
181+
Crate: smallvec
182+
Version: 0.6.13
183+
Title: Buffer overflow in SmallVec::insert_many
184+
Date: 2021-01-08
185+
ID: RUSTSEC-2021-0003
186+
URL: https://rustsec.org/advisories/RUSTSEC-2021-0003
187+
Solution: Upgrade to >=0.6.14, <1.0.0 OR >=1.6.1
188+
Dependency tree:
189+
smallvec 0.6.13
190+
191+
Crate: smallvec
192+
Version: 1.2.0
193+
Title: Buffer overflow in SmallVec::insert_many
194+
Date: 2021-01-08
195+
ID: RUSTSEC-2021-0003
196+
URL: https://rustsec.org/advisories/RUSTSEC-2021-0003
197+
Solution: Upgrade to >=0.6.14, <1.0.0 OR >=1.6.1
198+
Dependency tree:
199+
smallvec 1.2.0
200+
90201
Crate: ws
91202
Version: 0.7.9
92203
Title: Insufficient size checks in outgoing buffer in ws allows remote attacker to run the process out of memory
@@ -203,6 +314,10 @@ tempdir 0.3.7
203314
├── cita-executor 20.2.0
204315
└── cita-auth 20.2.0
205316
317+
Crate: arc-swap
318+
Version: 0.4.4
319+
Warning: yanked
320+
206321
Crate: blake2b
207322
Version: 0.1.0
208323
Warning: yanked
@@ -287,7 +402,46 @@ Crate: bumpalo
287402
Version: 3.2.0
288403
Warning: yanked
289404
290-
error: 5 vulnerabilities found!
291-
warning: 6 allowed warnings found
405+
Crate: miow
406+
Version: 0.2.1
407+
Warning: yanked
408+
Dependency tree:
409+
miow 0.2.1
410+
411+
Crate: miow
412+
Version: 0.3.5
413+
Warning: yanked
414+
Dependency tree:
415+
miow 0.3.5
416+
417+
Crate: net2
418+
Version: 0.2.33
419+
Warning: yanked
420+
421+
Crate: socket2
422+
Version: 0.3.12
423+
Warning: yanked
424+
Dependency tree:
425+
socket2 0.3.12
426+
├── miow 0.3.5
427+
└── hyper 0.13.7
428+
429+
Crate: tentacle-discovery
430+
Version: 0.2.9
431+
Warning: yanked
432+
Dependency tree:
433+
tentacle-discovery 0.2.9
434+
└── cita-network 20.2.0
435+
436+
error: 9 vulnerabilities found!
437+
warning: 12 allowed warnings found
292438
"
293-
cargo audit --ignore RUSTSEC-2020-0006 --ignore RUSTSEC-2020-0060 --ignore RUSTSEC-2020-0059 --ignore RUSTSEC-2019-0027 --ignore RUSTSEC-2020-0043
439+
440+
cargo audit --ignore RUSTSEC-2020-0091 \
441+
--ignore RUSTSEC-2020-0006 \
442+
--ignore RUSTSEC-2020-0060 \
443+
--ignore RUSTSEC-2020-0059 \
444+
--ignore RUSTSEC-2019-0027 \
445+
--ignore RUSTSEC-2020-0082 \
446+
--ignore RUSTSEC-2021-0003 \
447+
--ignore RUSTSEC-2020-0043

0 commit comments

Comments
 (0)