From 7b21728007151b64c06a70d5cdcf56e15c993058 Mon Sep 17 00:00:00 2001 From: lixiumei Date: Sat, 2 Apr 2022 07:44:46 +0000 Subject: [PATCH] Crash when getting a null tag in a read response --- plugins/restful/rw_handle.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/restful/rw_handle.c b/plugins/restful/rw_handle.c index b8bf2192..20e70e5e 100644 --- a/plugins/restful/rw_handle.c +++ b/plugins/restful/rw_handle.c @@ -231,6 +231,10 @@ void handle_read_resp(void *cmd_resp) neu_datatag_t *tag = neu_datatag_tbl_get(datatag_table, (datatag_id_t) iv->key); + if (tag == NULL) { + continue; + } + api_res.tags[i].name = tag->name; api_res.tags[i].error = NEU_ERR_SUCCESS;