Changed maximum buffer size in valid_length() and updated the license text in README

This commit is contained in:
varjolintu
2017-12-03 11:22:13 +02:00
parent 31fa5bfdf2
commit 4bc5d09832
2 changed files with 20 additions and 2 deletions
+2 -2
View File
@@ -10,10 +10,10 @@ mod proxy_socket;
use proxy_socket::ProxySocket;
const BUFFER_SIZE: u32 = 1024 * 16;
const BUFFER_SIZE: u32 = 1024 * 16; // 1024 ^ 2 is the maximum
fn valid_length(length: u32) -> bool {
return length > 0 && length <= 4096; // 1024 ^ 2 is the maximum
return length > 0 && length <= BUFFER_SIZE;
}
fn read_header() -> u32 {