diff --git a/json_object.c b/json_object.c index 14cd594..8f8705a 100644 --- a/json_object.c +++ b/json_object.c @@ -1047,7 +1047,7 @@ static int json_object_double_to_json_string_format(struct json_object *jso, str { // Ensure it looks like a float, even if snprintf didn't, // unless a custom format is set to omit the decimal. - strcat(buf, ".0"); + strncat(buf, ".0", 2); size += 2; } if (p && (flags & JSON_C_TO_STRING_NOZERO))