aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Sauter <sauter@locoslab.com>2018-03-09 13:53:08 +0100
committerAnders Broman <a.broman58@gmail.com>2018-03-09 15:44:05 +0000
commit02085c80ab10507f6a75d75fe1e43facade98a0e (patch)
tree361cacba703ae831868f2abbef07258f2ae127ff
parentb91f7f1a0cf014d1f838595d85161a13ebe157b2 (diff)
IEEE 802.15.4: fix wmem_free instead of g_free; fix outdated comments
Change-Id: Idfb2b5a9d6fd1c571a5a9edeb91e7f9281a06df0 Reviewed-on: https://code.wireshark.org/review/26363 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-ieee802154.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 2bc886cd89..bc0ba98bb8 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -3591,13 +3591,7 @@ dissect_ieee802154_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
} /* dissect_ieee802154_command */
/**
- * IEEE 802.15.4 decryption algorithm. Tries to find the
- * appropriate key from the information in the IEEE 802.15.4
- * packet structure and dissector config.
- *
- * This function implements the security proceedures for the
- * 2006 version of the spec only. IEEE 802.15.4-2003 is
- * unsupported.
+ * IEEE 802.15.4 decryption algorithm
* @param tvb IEEE 802.15.4 packet.
* @param pinfo Packet info structure.
* @param offset Offset where the ciphertext 'c' starts.
@@ -3651,10 +3645,7 @@ dissect_ieee802154_decrypt(tvbuff_t *tvb,
tvb_memcpy(tvb, decrypt_info->rx_mic, offset + reported_len, M);
}
- /*
- * Key Lookup - Need to find the appropriate key.
- *
- */
+ /* We need the extended source address. */
if ((packet->key_index == IEEE802154_THR_WELL_KNOWN_KEY_INDEX) &&
(packet->key_source.addr32 == IEEE802154_THR_WELL_KNOWN_KEY_SRC))
{
@@ -3699,7 +3690,7 @@ dissect_ieee802154_decrypt(tvbuff_t *tvb,
/* Perform CTR-mode transformation. */
if (!ccm_ctr_encrypt(decrypt_info->key, tmp, decrypt_info->rx_mic, text, captured_len)) {
- g_free(text);
+ wmem_free(pinfo->pool, text);
*decrypt_info->status = DECRYPT_PACKET_DECRYPT_FAILED;
return NULL;
}