diff options
author | Martin Thomson <martin.thomson@gmail.com> | 2018-10-23 17:23:13 +1100 |
---|---|---|
committer | Martin Thomson <martin.thomson@gmail.com> | 2018-10-23 17:23:13 +1100 |
commit | b579873d906177a65aab1c9ad1143df86cd5f042 (patch) | |
tree | d7e8227be998589a2400e128e444d553e0d5d5fd /cpputil | |
parent | 3e805c129f258d6e04c0785919e6c8b624b4b26f (diff) | |
download | nss-hg-b579873d906177a65aab1c9ad1143df86cd5f042.tar.gz |
Bug 1501174 - zero DataBuffer on allocation, r=franziskus
Diffstat (limited to 'cpputil')
-rw-r--r-- | cpputil/databuffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpputil/databuffer.h b/cpputil/databuffer.h index 5ec035098..e981a7c22 100644 --- a/cpputil/databuffer.h +++ b/cpputil/databuffer.h @@ -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; } |