Merge pull request #326 from eeff/eeff/fix

Fix mqtt plugin to validate tags before adding/updating
This commit is contained in:
fengzeroz
2022-03-18 14:50:21 +08:00
committed by GitHub
+1 -1
View File
@@ -67,7 +67,7 @@ size_t msg_external_data_get_size()
void msg_with_struct_init(message_t *msg, msg_type_e type, void *struct_ptr,
size_t struct_size)
{
if (!(msg != NULL && struct_ptr != NULL && 0 != struct_size)) {
if (msg == NULL || (struct_ptr == NULL && 0 != struct_size)) {
log_error("msg_with_struct_init called with NULL pointr");
return;
}