From b579873d906177a65aab1c9ad1143df86cd5f042 Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Tue, 23 Oct 2018 17:23:13 +1100 Subject: Bug 1501174 - zero DataBuffer on allocation, r=franziskus --- cpputil/databuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpputil') 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; } -- cgit v1.2.1