commit | bc410e03a63bce7fdcea8d33e3af7f2d51eebffc | [log] [tgz] |
---|---|---|
author | Alessandro Ghedini <alessandro@ghedini.me> | Mon Nov 25 13:25:23 2019 +0000 |
committer | Alessandro Ghedini <alessandro@ghedini.me> | Mon Nov 25 21:49:57 2019 +0800 |
tree | 5d50828c605c0c57ecc33fd1f016b24e3084b887 | |
parent | ac2c280ad1d3aa90594f633598506cd3d3e395ba [diff] |
validate incoming max_packet_size transport parameter
diff --git a/src/lib.rs b/src/lib.rs index e0a05c5..b1fb7ed 100644 --- a/src/lib.rs +++ b/src/lib.rs
@@ -2904,6 +2904,10 @@ 0x0003 => { tp.max_packet_size = val.get_varint()?; + + if tp.max_packet_size < 1200 { + return Err(Error::InvalidTransportParam); + } }, 0x0004 => {