cJSON

mirror of Dave's cJSON
git clone git://git.thc420.xyz/cJSON
Log | Files | Refs | README | LICENSE

commit cc84a446be20cc283bafdc4d94c050ba1111ac02
parent e58f7ec027d00b7cdcbf63e518c1b5268b29b3da
Author: Max Bruckner <max@maxbruckner.de>
Date:   Thu, 23 Mar 2017 21:27:54 +0100

ensure: Fix potential off by one error.

Diffstat:
McJSON.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cJSON.c b/cJSON.c @@ -259,7 +259,7 @@ static unsigned char* ensure(printbuffer * const p, size_t needed, const interna return NULL; } - needed += p->offset; + needed += p->offset + 1; if (needed <= p->length) { return p->buffer + p->offset;