From a54c832626117d45aaf828a9ea9b327fa5feb359 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 19 Mar 2016 02:25:53 -0700 Subject: [PATCH] CYUTF8String cannot have a negative size, even -1. --- Console.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Console.cpp b/Console.cpp index 8a8277e..1f725ae 100644 --- a/Console.cpp +++ b/Console.cpp @@ -272,9 +272,10 @@ static CYUTF8String Run(CYPool &pool, int client, CYUTF8String code) { _assert(CYSendAll(client, code.data, code.size)); mode_ = Waiting; _assert(CYRecvAll(client, &size, sizeof(size))); - if (size == _not(uint32_t)) + if (size == _not(uint32_t)) { + size = 0; json = NULL; - else { + } else { char *temp(new(pool) char[size + 1]); _assert(CYRecvAll(client, temp, size)); temp[size] = '\0'; -- 2.49.0