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
+18
View File
@@ -5,3 +5,21 @@ This is still under development. Installing the proxy needs manual changes to JS
See [this page](https://developer.chrome.com/extensions/nativeMessaging) for further information. See [this page](https://developer.chrome.com/extensions/nativeMessaging) for further information.
keepassxc-proxy listens stdin from keepassxc-browser extension and transfers the data to Unix domain socket `/tmp/kpxc_server` which KeePassXC listens. keepassxc-proxy listens stdin from keepassxc-browser extension and transfers the data to Unix domain socket `/tmp/kpxc_server` which KeePassXC listens.
```
Copyright (C) 2017 Sami Vänttinen <sami.vanttinen@protonmail.com>
Copyright (C) 2017 Andy Brandt <andy@brandt.tech>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
```
+2 -2
View File
@@ -10,10 +10,10 @@ mod proxy_socket;
use proxy_socket::ProxySocket; 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 { 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 { fn read_header() -> u32 {