Navigation Menu

Skip to content

Commit

Permalink
Bug 1501174 - zero DataBuffer on allocation, r=franziskus
Browse files Browse the repository at this point in the history
  • Loading branch information
martinthomson committed Oct 23, 2018
1 parent 7d8f36e commit 7d0f4c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpputil/databuffer.h
Expand Up @@ -34,7 +34,7 @@ class DataBuffer {

void Allocate(size_t l) {
delete[] data_;
data_ = new uint8_t[l ? l : 1]; // Don't depend on new [0].
data_ = new uint8_t[l ? l : 1](); // Don't depend on new [0].
len_ = l;
}

Expand Down

0 comments on commit 7d0f4c6

Please sign in to comment.