diff --git a/README.md b/README.md index 6a681f4..76a57e6 100644 --- a/README.md +++ b/README.md @@ -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. 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 +Copyright (C) 2017 Andy Brandt + +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 . +``` diff --git a/src/main.rs b/src/main.rs index ad6578c..51b9e63 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 {