Skip to content

Commit

Permalink
Changed maximum buffer size in valid_length() and updated the license…
Browse files Browse the repository at this point in the history
… text in README
  • Loading branch information
varjolintu committed Dec 3, 2017
1 parent 31fa5bf commit 4bc5d09
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
Copyright (C) 2017 Andy Brandt <[email protected]>
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/>.
```
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4bc5d09

Please sign in to comment.