From 7d726c8da6fa122a75d1f98e4a780439d8ccbfe7 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 12 Jun 2020 09:26:47 -0700 Subject: [PATCH] JSON parser: Bugfix for float/double in quotes. --- upb/json_decode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/upb/json_decode.c b/upb/json_decode.c index 9c70173165..953d2387ed 100644 --- a/upb/json_decode.c +++ b/upb/json_decode.c @@ -409,6 +409,7 @@ static upb_strview jsondec_string(jsondec *d) { upb_strview ret; ret.data = buf; ret.size = end - buf; + *end = '\0'; /* Needed for possible strtod(). */ return ret; } case '\\':