From 0b6bb6949e884bc861798ab22f03b0c2f849ea31 Mon Sep 17 00:00:00 2001 From: Martin Mathieson Date: Mon, 6 Jun 2022 17:58:07 +0100 Subject: [PATCH] DCT2000: Fix format of string with PDCP-NR keys --- epan/dissectors/packet-catapult-dct2000.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index 4006623e07..9420ba34d3 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -3009,12 +3009,12 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo /* e.g. NRPDCP: RRCPRIM:ueId= 1;setThreadAuthKey: RRC id=1 alg 2 key: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 */ if (strstr(string, "setThreadAuthKey:")) { guint ue_id, id, alg; - if (!PINFO_FD_VISITED(pinfo) && sscanf(string, "NRPDCP: RRCPRIM:ueId= %u; RRC setThreadAuthKey: id=%u alg %u key: ", &ue_id, &id, &alg) == 3) { + if (!PINFO_FD_VISITED(pinfo) && sscanf(string, "NRPDCP: RRCPRIM:ueId= %u;setThreadAuthKey: RRC id=%u alg %u key: ", &ue_id, &id, &alg) == 3) { char *key = g_strdup(strstr(string, "key: ")+5); set_pdcp_nr_rrc_integrity_key(ue_id, key, pinfo->num); g_free(key); } - else if (!PINFO_FD_VISITED(pinfo) && sscanf(string, "NRPDCP: RRCPRIM:ueId= %u; UP setThreadAuthKey: id=%u alg %u key: ", &ue_id, &id, &alg) == 3) { + else if (!PINFO_FD_VISITED(pinfo) && sscanf(string, "NRPDCP: RRCPRIM:ueId= %u;setThreadAuthKey: UP id=%u alg %u key: ", &ue_id, &id, &alg) == 3) { char *key = g_strdup(strstr(string, "key: ")+5); set_pdcp_nr_up_integrity_key(ue_id, key, pinfo->num); g_free(key); @@ -3022,12 +3022,12 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo } else if (strstr(string, "setThreadCryptKey:")) { guint ue_id, id, alg; - if (!PINFO_FD_VISITED(pinfo) && sscanf(string, "NRPDCP: RRCPRIM:ueId= %u; RRC setThreadCryptKey: id=%u alg %u key: ", &ue_id, &id, &alg) == 3) { + if (!PINFO_FD_VISITED(pinfo) && sscanf(string, "NRPDCP: RRCPRIM:ueId= %u;setThreadCryptKey: RRC id=%u alg %u key: ", &ue_id, &id, &alg) == 3) { char *key = g_strdup(strstr(string, "key: ")+5); set_pdcp_nr_rrc_ciphering_key(ue_id, key, pinfo->num); g_free(key); } - else if (!PINFO_FD_VISITED(pinfo) && sscanf(string, "NRPDCP: RRCPRIM:ueId= %u; UP setThreadCryptKey: id=%u alg %u key: ", &ue_id, &id, &alg) == 3) { + else if (!PINFO_FD_VISITED(pinfo) && sscanf(string, "NRPDCP: RRCPRIM:ueId= %u;setThreadCryptKey: UP id=%u alg %u key: ", &ue_id, &id, &alg) == 3) { char *key = g_strdup(strstr(string, "key: ")+5); set_pdcp_nr_up_ciphering_key(ue_id, key, pinfo->num); g_free(key);