From ee056a089cd9e6433456fea4dd3af1a85a148327 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Wed, 1 Jul 2015 20:34:57 -0400 Subject: [PATCH] match new[] operator with delete[] operator The string ends up being deleted with the [] variant later on. CID 602975. --- src/bin/hey.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/hey.cpp b/src/bin/hey.cpp index a086c5db18..646a6a5ee8 100644 --- a/src/bin/hey.cpp +++ b/src/bin/hey.cpp @@ -1168,7 +1168,7 @@ format_data(int32 type, char *ptr, long size) char *tempstr; if (size <= 0L) { - str = new char; + str = new char[1]; *str = 0; return str; }