aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util/AllocatedString.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/AllocatedString.hxx b/src/util/AllocatedString.hxx
index e01955381..01eefac8a 100644
--- a/src/util/AllocatedString.hxx
+++ b/src/util/AllocatedString.hxx
@@ -90,7 +90,7 @@ public:
static AllocatedString Duplicate(const_pointer begin,
size_t length) {
- auto p = new value_type[length];
+ auto p = new value_type[length + 1];
*std::copy_n(begin, length, p) = SENTINEL;
return Donate(p);
}