Alexey Galakhov
9bd65feaeb
frame: reject frames that are too big for the RAM
...
Fixes #34 .
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
977c6e7c7a
refactor: remove transmute in favor of safe code
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
c0cde68999
frame: fix integer overflow
...
This is a security fix.
Fixes #33 .
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
7 years ago
Alexey Galakhov
01a9211a84
Move mask functions into a separate file
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
8df6bdbeb0
Add Display to CloseFrame and CloseCode
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Alexey Galakhov
bd37c71609
Replace tuple with CloseFrame struct
...
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
8 years ago
Ran Benita
be834ac261
Replace unsafe endianness code with byteorder functions
8 years ago
Ran Benita
8955b55e62
Simplify concatenation code using slice::concat
8 years ago
Ran Benita
3c600aa138
Speed up apply_mask() - part 2
...
This is using some unsafe code and assumptions about alignment to speed
up apply_mask() more.
In profiles, this optimization reduces it from ~55% of the total runtime
to ~7%.
8 years ago
Ran Benita
dd96d3b9d4
Speed up apply_mask()
...
This function is the most speed-critical in the library. In profiles,
this optimization reduces it from ~75% of the profile to ~55%.
I have tried several approaches, but didn't manage to improve on this
one (LLVM already unrolls the loop here). Though I'm sure it is possible.
8 years ago
Ran Benita
ea4b5e4df0
Remove unnecessary transmute in generate_mask()
...
rand::Rand has
impl<T> Rand for [T; 16] where T: Rand
so we don't need to simulate it ourselves.
8 years ago
Alexey Galakhov
e63f594a14
Initial commit, mostly working client
8 years ago