From 56d9c48573e4bfe98021fc0c678e20b90538c976 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Tue, 11 Jun 2013 12:49:03 +0200 Subject: crypto: fix excessive buffer allocation Allocate buffer only if the next one isn't free. --- src/node_crypto_bio.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/node_crypto_bio.h') diff --git a/src/node_crypto_bio.h b/src/node_crypto_bio.h index e565b7fc93..c2fd6a0ba7 100644 --- a/src/node_crypto_bio.h +++ b/src/node_crypto_bio.h @@ -59,6 +59,9 @@ class NodeBIO { ~NodeBIO(); + // Allocate new buffer for write if needed + void TryAllocateForWrite(); + // Read `len` bytes maximum into `out`, return actual number of read bytes size_t Read(char* out, size_t size); -- cgit v1.2.1