summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-02-17 17:42:00 +0100
committerTobias Klauser <tklauser@distanz.ch>2015-02-17 17:42:00 +0100
commitd0905f3cfb7831fcd823dd55675b1ba50e147a1e (patch)
tree7f540bd997930bc796fcc055a358d5e90eafb79b
parent81bf2c13db079821b0bb1d5284df3b7818a6edbb (diff)
llmnr-query: Skip length byte when getting previous name in compressed name extraction
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--llmnr-query.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/llmnr-query.c b/llmnr-query.c
index 8a4a19d..5ee07ec 100644
--- a/llmnr-query.c
+++ b/llmnr-query.c
@@ -197,7 +197,7 @@ int main(int argc, char **argv)
/* compression? */
if (nl & 0xC0) {
uint16_t ptr = (nl & 0x3F) << 8 | *pkt_put(p, 1);
- name = (char *)p->data + ptr;
+ name = (char *)p->data + ptr + 1;
} else
name = (char *)pkt_put(p, nl + 1);