aboutsummaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-10-15 01:20:14 +0200
committerClifford Wolf <clifford@clifford.at>2014-10-15 01:20:14 +0200
commit8cea352a6aafa80d397d8a6a7d195c1378dcb324 (patch)
treecc670a0dadca8f6df7a1d24e1f00fa649d40f29a /libs
parent2873a8444ee5dbd0a3d034fb4a7a877c680be45d (diff)
parent1fc6208ec05af672c7c6b7973b0eba1295bca5f4 (diff)
downloadyosys-8cea352a6aafa80d397d8a6a7d195c1378dcb324.tar.gz
yosys-8cea352a6aafa80d397d8a6a7d195c1378dcb324.tar.bz2
yosys-8cea352a6aafa80d397d8a6a7d195c1378dcb324.zip
Merge branch 'win32'
Diffstat (limited to 'libs')
-rw-r--r--libs/sha1/sha1.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/sha1/sha1.cpp b/libs/sha1/sha1.cpp
index dc86b2ce2..883d42837 100644
--- a/libs/sha1/sha1.cpp
+++ b/libs/sha1/sha1.cpp
@@ -256,9 +256,12 @@ void SHA1::buffer_to_block(const std::string &buffer, uint32 block[BLOCK_BYTES])
void SHA1::read(std::istream &is, std::string &s, int max)
{
- char sbuf[max];
+ char* sbuf = new char[max];
+
is.read(sbuf, max);
s.assign(sbuf, is.gcount());
+
+ delete[] sbuf;
}