Browse Source

node: follow specification, zero-fill ArrayBuffers

Fixes #6664
v0.11.10-release
Trevor Norris 11 years ago
parent
commit
7222539936
  1. 4
      src/node.cc

4
src/node.cc

@ -165,7 +165,9 @@ ArrayBufferAllocator ArrayBufferAllocator::the_singleton;
void* ArrayBufferAllocator::Allocate(size_t length) {
if (length > kMaxLength)
return NULL;
return new char[length];
char* data = new char[length];
memset(data, 0, length);
return data;
}

Loading…
Cancel
Save