chore(log): limit string length

This commit is contained in:
fengzero
2023-05-17 10:01:45 +00:00
parent 90e7b0ec03
commit 82fe13876f
+3 -2
View File
@@ -179,8 +179,9 @@ static inline char *neu_value_str(neu_type_e type, neu_value_u value)
value.boolean);
break;
case NEU_TYPE_STRING: {
snprintf(str, sizeof(str), "type: %s, value: %s", neu_type_string(type),
value.str);
snprintf(str, sizeof(str), "type: %s, value: %c%c%c",
neu_type_string(type), value.str[0], value.str[1],
value.str[2]);
break;
}
default: