From eaf749e9b4970229d5463f60b6efa6cd8655ab8c Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Tue, 9 Mar 2010 16:23:30 +0100 Subject: [PATCH] Fixed string argument for soe_write. --- tool/CommandSoeWrite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/CommandSoeWrite.cpp b/tool/CommandSoeWrite.cpp index 721764cc..1d93f48d 100644 --- a/tool/CommandSoeWrite.cpp +++ b/tool/CommandSoeWrite.cpp @@ -120,14 +120,14 @@ void CommandSoeWrite::execute(const StringVector &args) memSize = dataType->byteSize; } else { // guess string type size - memSize = args[1].size(); + memSize = args[1].size() + 1; if (!memSize) { err << "Empty argument not allowed."; throwInvalidUsageException(err); } } - ioctl.data = new uint8_t[memSize + 1]; + ioctl.data = new uint8_t[memSize]; try { ioctl.data_size = interpretAsType(