From f8f9008c96daf1cd89215b2c5ac887d75c89e4b6 Mon Sep 17 00:00:00 2001 From: toddouska Date: Fri, 5 Sep 2014 16:18:10 -0700 Subject: [PATCH 1/3] simplify hello_request padSz calc with cached value --- src/internal.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/internal.c b/src/internal.c index 98a7e354a..20defe319 100644 --- a/src/internal.c +++ b/src/internal.c @@ -4357,17 +4357,11 @@ static int DoHelloRequest(CYASSL* ssl, const byte* input, word32* inOutIdx, return BUFFER_ERROR; if (ssl->keys.encryptionOn) { - int padSz = ssl->keys.encryptSz - HANDSHAKE_HEADER_SZ - - ssl->specs.hash_size; - - if (ssl->options.tls1_1 && ssl->specs.cipher_type == block) - padSz -= ssl->specs.block_size; - /* access beyond input + size should be checked against totalSz */ - if ((word32) (*inOutIdx + ssl->specs.hash_size + padSz) > totalSz) - return INCOMPLETE_DATA; + if (*inOutIdx + ssl->keys.padSz > totalSz) + return BUFFER_E; - *inOutIdx += ssl->specs.hash_size + padSz; + *inOutIdx += ssl->keys.padSz; } if (ssl->options.side == CYASSL_SERVER_END) { From a905d3f877591d8f69f67503abdd1c9275808afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moise=CC=81s=20Guimara=CC=83es?= Date: Fri, 5 Sep 2014 12:55:57 -0300 Subject: [PATCH 2/3] add libpq-dev (bump dependency) --- Vagrantfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 4117f4802..881547203 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,8 +3,7 @@ $setup = <