aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dns.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2017-01-20 09:58:09 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2017-01-20 10:12:25 +0000
commit132cd6dbace220a62e3083e67d859a77cc832163 (patch)
tree6d8568de457ae4a00cee60080ff99de21950b633 /epan/dissectors/packet-dns.c
parent5c0003a980f2f6de474b225aa99229701e7f3c11 (diff)
DNS: update name_len variable when replacing name string
Bug: 13334 Change-Id: I07248747f678d4f89bbde33280b4d596462a4429 Reviewed-on: https://code.wireshark.org/review/19688 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dns.c')
-rw-r--r--epan/dissectors/packet-dns.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c
index 53ae14462c..2abfdbcbbd 100644
--- a/epan/dissectors/packet-dns.c
+++ b/epan/dissectors/packet-dns.c
@@ -1244,6 +1244,7 @@ expand_dns_name(tvbuff_t *tvb, int offset, int max_len, int dns_data_offset,
default:
*name="<Unknown extended label>";
+ *name_len = (guint)strlen(*name);
/* Parsing will probably fail from here on, since the */
/* label length is unknown... */
len = offset - start_offset;
@@ -1276,6 +1277,7 @@ expand_dns_name(tvbuff_t *tvb, int offset, int max_len, int dns_data_offset,
looping. */
if (chars_processed >= data_size) {
*name="<Name contains a pointer that loops>";
+ *name_len = (guint)strlen(*name);
if (len < min_len) {
THROW(ReportedBoundsError);
}