aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2023-03-01 13:35:16 +0100
committerJohn Thacker <johnthacker@gmail.com>2023-03-02 23:47:05 +0000
commitfc15fe3b4a771a0a05d7b8ea07545eb4d3690f68 (patch)
tree18cfec0f129e004c8bbce88f6ab1360b098f0857
parentceb5a2d55b30624f9ad22358990cdecf7a7aa9af (diff)
DRDA: Add SQL Statement Length
Add missing length to SQL Statement Close: 18876
-rw-r--r--epan/dissectors/packet-drda.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/epan/dissectors/packet-drda.c b/epan/dissectors/packet-drda.c
index c6231f04cc..659c4848bd 100644
--- a/epan/dissectors/packet-drda.c
+++ b/epan/dissectors/packet-drda.c
@@ -59,6 +59,7 @@ static int hf_drda_param_length = -1;
static int hf_drda_param_codepoint = -1;
static int hf_drda_param_data = -1;
static int hf_drda_param_data_ebcdic = -1;
+static int hf_drda_sqlstatement_length = -1;
static int hf_drda_sqlstatement = -1;
static int hf_drda_sqlstatement_ebcdic = -1;
@@ -716,7 +717,8 @@ dissect_drda_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
tvbuff_t* next_tvb = NULL;
next_tvb = tvb_new_subset_length(tvb, offset + 4, iLengthParam - 4);
add_new_data_source(pinfo, next_tvb, "SQL statement");
- proto_tree_add_item(drdaroot_tree, hf_drda_sqlstatement, next_tvb, 0, iLengthParam - 5, ENC_UTF_8);
+ proto_tree_add_item(drdaroot_tree, hf_drda_sqlstatement_length, next_tvb, 0, 1, ENC_NA);
+ proto_tree_add_item(drdaroot_tree, hf_drda_sqlstatement, next_tvb, 1, iLengthParam - 6, ENC_UTF_8);
proto_tree_add_item(drdaroot_tree, hf_drda_sqlstatement_ebcdic, next_tvb, 0, iLengthParam - 4, ENC_EBCDIC);
}
}
@@ -847,6 +849,11 @@ proto_register_drda(void)
FT_STRING, BASE_NONE, NULL, 0x0,
"Param data converted from EBCDIC to ASCII for display", HFILL }},
+ { &hf_drda_sqlstatement_length,
+ { "SQL statement Length", "drda.sqlstatement.length",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
+
{ &hf_drda_sqlstatement,
{ "SQL statement (ASCII)", "drda.sqlstatement",
FT_STRING, BASE_NONE, NULL, 0x0,