From 344d68a938e34085b34c68d6bec666d377245e31 Mon Sep 17 00:00:00 2001 From: "yurys@chromium.org" Date: Wed, 22 Apr 2009 13:04:19 +0000 Subject: [PATCH] This issue was introduced by http://codereview.chromium.org/67266 Review URL: http://codereview.chromium.org/93014 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/debug.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/debug.cc b/src/debug.cc index 1179bfc880..da5952ba0d 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -2213,8 +2213,9 @@ Message Message::NewOutput(v8::Handle output, v8::Debug::ClientData* data) { Vector text; if (!output.IsEmpty()) { - text = Vector::New(output->Length() + 1); - output->Write(text.start()); + // Do not include trailing '\0'. + text = Vector::New(output->Length()); + output->Write(text.start(), 0, output->Length()); } return Message(text, data, false); }