From 8f06b6fbad79fdb05455c13b56d04f2166d2d25b Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 28 Apr 2019 06:58:13 +0100 Subject: [PATCH] lejp: allow up to 20 digit decimal numbers https://github.com/warmcat/libwebsockets/issues/1559 --- lib/misc/lejp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/misc/lejp.c b/lib/misc/lejp.c index 281a18c6d..2190413e1 100644 --- a/lib/misc/lejp.c +++ b/lib/misc/lejp.c @@ -514,7 +514,7 @@ lejp_parse(struct lejp_ctx *ctx, const unsigned char *json, int len) goto append_npos; } - if (ctx->dcount < 10 && c >= '0' && c <= '9') { + if (ctx->dcount < 20 && c >= '0' && c <= '9') { if (ctx->f & LEJP_SEEN_POINT) ctx->f |= LEJP_SEEN_POST_POINT; ctx->dcount++;