aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dns.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-11-07 15:32:53 +0100
committerAnders Broman <a.broman58@gmail.com>2014-11-07 15:43:52 +0000
commitaec5ffb535be189a0861531aeceb7be557e47336 (patch)
treee6111973d615dac70e3ce6e6c2b9a3eb9633f748 /epan/dissectors/packet-dns.c
parentde37217933f2b9e11f52434fae468e1a79ace7c9 (diff)
DNS: WKS RR Protocol field is read as 4 bytes instead of 1
In the attached pcap file, there's a single DNS packet with WKS RR in the Prerequisites section. The Protocol field of this RR is read as if it is 4 bytes long instead of 1, which actually reads part of the bytes of the following RR. Found by boaz Bug:10675 Change-Id: Icf12c7f3864b629a242598373c06eee4de0ca098 Reviewed-on: https://code.wireshark.org/review/5170 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dns.c')
-rw-r--r--epan/dissectors/packet-dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c
index f1d50c9a32..3226b56cc1 100644
--- a/epan/dissectors/packet-dns.c
+++ b/epan/dissectors/packet-dns.c
@@ -1919,7 +1919,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
cur_offset += 4;
rr_len -= 4;
- proto_tree_add_item(rr_tree, hf_dns_wks_protocol, tvb, cur_offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(rr_tree, hf_dns_wks_protocol, tvb, cur_offset, 1, ENC_BIG_ENDIAN);
protocol = tvb_get_guint8(tvb, cur_offset);
cur_offset += 1;
rr_len -= 1;