From: Jay Freeman (saurik) Date: Sat, 19 Mar 2016 09:25:53 +0000 (-0700) Subject: CYUTF8String cannot have a negative size, even -1. X-Git-Tag: v0.9.593~6 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/a54c832626117d45aaf828a9ea9b327fa5feb359 CYUTF8String cannot have a negative size, even -1. --- 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';