summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-06-13 14:11:02 -0700
committerMichael Mann <mmann78@netscape.net>2017-06-13 22:57:35 +0000
commit9c86ec08aa66b0dace191519c410503cde924319 (patch)
treef62a1d80c1cb30e7224922ece1031e0b7801e6cb /epan
parentf3267f17a3fc3c8ab138940653f2e968c5d27378 (diff)
downloadwireshark-9c86ec08aa66b0dace191519c410503cde924319.tar.gz
Don't use frame_length at all if we don't have libgcrypt >= 1.6.0 and encryption keys.
Change-Id: Ia82fa67bbb9056204ed70b150f3d1e6db9ceed25 Reviewed-on: https://code.wireshark.org/review/22116 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-lorawan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-lorawan.c b/epan/dissectors/packet-lorawan.c
index fbbc2dd09c..6129d23b9a 100644
--- a/epan/dissectors/packet-lorawan.c
+++ b/epan/dissectors/packet-lorawan.c
@@ -654,7 +654,6 @@ dissect_lorawan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *d
guint8 fport;
guint32 dev_address;
guint32 fcnt;
- gint frame_length;
gboolean uplink = TRUE;
device_encryption_keys_t *encryption_keys = NULL;
@@ -820,9 +819,9 @@ dissect_lorawan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *d
* MIC = cmac[0..3]
* B0 = 0x49 | 0x00 | 0x00 | 0x00 | 0x00 | dir | devAddr | fcntup/fcntdown | len(msg)
*/
- frame_length = current_offset;
#if GCRYPT_VERSION_NUMBER >= 0x010600 /* 1.6.0 */
if (encryption_keys) {
+ gint frame_length = current_offset;
guint8 *msg = (guint8 *)wmem_alloc0(wmem_packet_scope(), frame_length + 16);
msg[0] = 0x49;
msg[5] = uplink ? 0 : 1;