Compatability and benchmark fixes for native code.

This commit is contained in:
md_5
2016-01-16 13:29:50 +11:00
parent 83e27f07e6
commit 7907610eeb
3 changed files with 9 additions and 1 deletions

View File

@@ -44,6 +44,12 @@ public class NativeCipher implements BungeeCipher
// Store how many bytes we can cipher
int length = in.readableBytes();
// Older OpenSSL versions will flip if length <= 0
if ( length <= 0 )
{
return;
}
// It is important to note that in AES CFB-8 mode, the number of read bytes, is the number of outputted bytes
out.ensureWritable( length );