mirror of https://github.com/YosysHQ/yosys.git
Changed to explicit heap allocated memory
This commit is contained in:
parent
6433203b39
commit
9ee3a4b94f
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue