mirror of
https://github.com/emqx/neuron.git
synced 2026-10-27 04:19:50 +08:00
Merge pull request #2505 from moruoxian/main
fix: handle NULL json_str case to avoid undefined behavior
This commit is contained in:
@@ -1491,7 +1491,9 @@ int handle_trans_data(neu_plugin_t * plugin,
|
||||
plugin, trans_data, plugin->config.format,
|
||||
plugin->config.schema_vts, plugin->config.n_schema_vt,
|
||||
static_tags, n_satic_tag, &skip_none);
|
||||
size = strlen(json_str);
|
||||
if (json_str != NULL) {
|
||||
size = strlen(json_str);
|
||||
}
|
||||
}
|
||||
if (n_satic_tag > 0) {
|
||||
mqtt_static_free(static_tags, n_satic_tag);
|
||||
|
||||
Reference in New Issue
Block a user