diff --git a/epan/dissectors/packet-asterix.c b/epan/dissectors/packet-asterix.c index cdfb725b7b..c30293efa6 100644 --- a/epan/dissectors/packet-asterix.c +++ b/epan/dissectors/packet-asterix.c @@ -9,7 +9,7 @@ See tools/asterix/README.md for details. Data source: https://zoranbosnjak.github.io/asterix-specs -git revision: cef694825c23c1e5212c360fe88209948f120b3f +git revision: 797e57629827d0778a793e5200dc924640100fc9 */ @@ -33147,7 +33147,7 @@ static void asterix_build_subtree (tvbuff_t *tvb, packet_info *pinfo, guint offs break; case FIELD_PART_CALLSIGN: str_buffer = wmem_strdup_printf( - wmem_packet_scope (), + pinfo->pool, "%c%c%c%c%c%c%c%c", AISCode[(value >> 42) & 63], AISCode[(value >> 36) & 63], @@ -33161,7 +33161,7 @@ static void asterix_build_subtree (tvbuff_t *tvb, packet_info *pinfo, guint offs break; case FIELD_PART_IAS_IM: /* special processing for I021/150 and I062/380#4 because Air Speed depends on IM subfield */ - air_speed_im_bit = wmem_new (wmem_packet_scope (), guint8); + air_speed_im_bit = wmem_new (pinfo->pool, guint8); *air_speed_im_bit = (tvb_get_guint8 (tvb, offset_in_tvb) & 0x80) >> 7; /* Save IM info for the packet. key = 21150. */ p_add_proto_data (pinfo->pool, pinfo, proto_asterix, 21150, air_speed_im_bit); diff --git a/tools/asterix/packet-asterix-template.c b/tools/asterix/packet-asterix-template.c index d0b5d42d01..e5160afde6 100644 --- a/tools/asterix/packet-asterix-template.c +++ b/tools/asterix/packet-asterix-template.c @@ -638,7 +638,7 @@ static void asterix_build_subtree (tvbuff_t *tvb, packet_info *pinfo, guint offs break; case FIELD_PART_CALLSIGN: str_buffer = wmem_strdup_printf( - wmem_packet_scope (), + pinfo->pool, "%c%c%c%c%c%c%c%c", AISCode[(value >> 42) & 63], AISCode[(value >> 36) & 63], @@ -652,7 +652,7 @@ static void asterix_build_subtree (tvbuff_t *tvb, packet_info *pinfo, guint offs break; case FIELD_PART_IAS_IM: /* special processing for I021/150 and I062/380#4 because Air Speed depends on IM subfield */ - air_speed_im_bit = wmem_new (wmem_packet_scope (), guint8); + air_speed_im_bit = wmem_new (pinfo->pool, guint8); *air_speed_im_bit = (tvb_get_guint8 (tvb, offset_in_tvb) & 0x80) >> 7; /* Save IM info for the packet. key = 21150. */ p_add_proto_data (pinfo->pool, pinfo, proto_asterix, 21150, air_speed_im_bit);