From 06b49ba69db808608690395778f3608ea51c8d74 Mon Sep 17 00:00:00 2001 From: zyp Date: Sun, 22 Oct 2006 11:09:32 +0000 Subject: [project @ zyp-20061022110932-00381ac920067c75] [project @ 61] Allocating buffer from heap rather than stack. --- src/hash.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/hash.cpp b/src/hash.cpp index 82df4c0..c4adcd4 100644 --- a/src/hash.cpp +++ b/src/hash.cpp @@ -62,10 +62,11 @@ namespace Multihash { } void _hash_file(int fileno, Hash* hash) { - char buf[32768]; + char* buf = new char[32768]; int s; while((s = read(fileno, buf, 32768)) > 0) { hash->_update(buf, s); } + delete buf; } } -- cgit v1.2.3