aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dns.h
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2017-01-04 15:53:56 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2017-01-19 09:31:37 +0000
commitc397adda8a7af8374ba1355f8c221f48abfac42a (patch)
tree6ebe3eb7204ceab9ffe93036f58066abcdc9bbab /epan/dissectors/packet-dns.h
parenta056b685760340e2a3d83014f618ba567fc8355b (diff)
dns: change get_dns_name to return consumed bytes + actual name len.
Because of the DNS name encoding, the consumed bytes in the tvb and the length of the string of the dns name can be different. We need to handle them separately for the purpose they are. Moreover the name string can contain null bytes, then we can't rely on strlen() but we need the actual length. Subsequent calls to proto_tree_add_string() will require to pass the string to format_text() in order have non-printable characters printed. Bug: 13289 Change-Id: I6d0b295867ece265f8995f82da2c629992aeb703 Reviewed-on: https://code.wireshark.org/review/19539 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dns.h')
-rw-r--r--epan/dissectors/packet-dns.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dns.h b/epan/dissectors/packet-dns.h
index 7fb6bee25b..9f8b8344e0 100644
--- a/epan/dissectors/packet-dns.h
+++ b/epan/dissectors/packet-dns.h
@@ -27,9 +27,9 @@
extern const value_string dns_classes[];
-int expand_dns_name(tvbuff_t *, int, int, int, const guchar **);
+int expand_dns_name(tvbuff_t *, int, int, int, const guchar **, guint*);
/* Just like expand_dns_name, but pretty-prints empty names. */
-int get_dns_name(tvbuff_t *, int, int, int, const guchar **);
+int get_dns_name(tvbuff_t *, int, int, int, const guchar **, guint*);
#define MAXDNAME 1025 /* maximum domain name length */