This repository was archived by the owner on Dec 26, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
accelerator/core/serializer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ static status_t send_mam_message_mam_v1_req_deserialize(cJSON const* const json_
6060 }
6161
6262 json_value = cJSON_GetObjectItemCaseSensitive (json_key , "seed" );
63- if (json_value != NULL ) {
63+ if (json_value && json_value -> valuestring ) {
6464 size_t seed_size = strnlen (json_value -> valuestring , NUM_TRYTES_ADDRESS );
6565
6666 if (seed_size != NUM_TRYTES_HASH ) {
@@ -73,7 +73,7 @@ static status_t send_mam_message_mam_v1_req_deserialize(cJSON const* const json_
7373 }
7474
7575 json_value = cJSON_GetObjectItemCaseSensitive (json_key , "chid" );
76- if (json_value != NULL ) {
76+ if (json_value && json_value -> valuestring ) {
7777 size_t chid_size = strnlen (json_value -> valuestring , NUM_TRYTES_ADDRESS );
7878
7979 if (chid_size != NUM_TRYTES_HASH ) {
@@ -86,7 +86,7 @@ static status_t send_mam_message_mam_v1_req_deserialize(cJSON const* const json_
8686 }
8787
8888 json_value = cJSON_GetObjectItemCaseSensitive (json_key , "message" );
89- if (json_value != NULL ) {
89+ if (json_value && json_value -> valuestring ) {
9090 size_t payload_size = strlen (json_value -> valuestring );
9191 data -> message = (char * )malloc ((payload_size + 1 ) * sizeof (char ));
9292
You can’t perform that action at this time.
0 commit comments