From 7d0f4c6e815e4b9d4477ff9d57309f52f9a857c2 Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Tue, 23 Oct 2018 17:23:13 +1100 Subject: [PATCH] Bug 1501174 - zero DataBuffer on allocation, r=franziskus --- cpputil/databuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpputil/databuffer.h b/cpputil/databuffer.h index 5ec0350986..e981a7c223 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; }