From 7f3f0a24f5dfd2edf2559bf220902d10eb50a496 Mon Sep 17 00:00:00 2001 From: Bernardo Bruning Date: Wed, 26 Jan 2022 22:17:52 -0300 Subject: [PATCH] Change size of buffer json --- tests/test_cpp.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 764d11e352..32e9355bdf 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -171,8 +171,8 @@ TEST(Cpp, TimestampEncoder) { for(long timestamp: timestamps) { google_protobuf_Timestamp_set_seconds(timestamp_upb, timestamp); - char* json = new char[300]; - size_t size = upb_JsonEncode(timestamp_upb, md.ptr(), NULL, 0, json, 300, NULL); + char* json = new char[23]; + size_t size = upb_JsonEncode(timestamp_upb, md.ptr(), NULL, 0, json, 23, NULL); bool result = upb_JsonDecode(json, size, timestamp_upb_decoded, md.ptr(), NULL, 0, arena.ptr(), NULL); const long timestamp_decoded = google_protobuf_Timestamp_seconds(timestamp_upb_decoded);