perf(non-null judgment):
add non-null judgment of "output_ptr->field_ptr" in in hlfabricDiscoveryPayloadPacked()
@@ -450,6 +450,10 @@ __BOATSTATIC BOAT_RESULT hlfabricDiscoveryPayloadPacked(BoatHlfabricTx *tx_ptr,
output_ptr->field_len = packedLength;
output_ptr->field_ptr = BoatMalloc(packedLength);
+ if(output_ptr->field_ptr == NULL){
+ BoatLog(BOAT_LOG_CRITICAL, "Fail to allocate output_ptr->field_ptr buffer.");
+ boat_throw(BOAT_ERROR_COMMON_OUT_OF_MEMORY, hlfabricPayloadPacked_exception);
+ }
memcpy(output_ptr->field_ptr, signatureHeaderPacked.field_ptr, signatureHeaderPacked.field_len);
memcpy(output_ptr->field_ptr + signatureHeaderPacked.field_len, payloadDataPacked.field_ptr, payloadDataPacked.field_len);
