From 2d2f77d65cd5c37892b3672c9d2751a072f074c8 Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Fri, 25 Feb 2005 08:19:01 +0000 Subject: [PATCH] tiny fix to the MOADNSParser wrt compressed labels in larger packets git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@329 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/dnsparser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index f450d96a0..d15177400 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -215,7 +215,7 @@ string PacketReader::getLabelFromContent(const vector& content, u_int1 break; } if((labellen & 0xc0) == 0xc0) { - u_int16_t offset=(labellen & ~0xc0) + content.at(frompos++) - sizeof(dnsheader); + u_int16_t offset=256*(labellen & ~0xc0) + (unsigned int)content.at(frompos++) - sizeof(dnsheader); // cout<<"This is an offset, need to go to: "<