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 '\\':