projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0d31ea
)
node: follow specification, zero-fill ArrayBuffers
author
Trevor Norris
<trev.norris@gmail.com>
Tue, 10 Dec 2013 01:11:38 +0000
(17:11 -0800)
committer
Trevor Norris
<trev.norris@gmail.com>
Tue, 10 Dec 2013 01:11:38 +0000
(17:11 -0800)
Fixes #6664
src/node.cc
patch
|
blob
|
history
diff --git
a/src/node.cc
b/src/node.cc
index
f079519
..
2d32b12
100644
(file)
--- a/
src/node.cc
+++ b/
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;
}