Permalink
Browse files

allow referencing of compressed label directly before another compres…

…sed label, thanks @giganteous
  • Loading branch information...
1 parent cb2753a commit 2dea55e9c8bf35fc3fd27304368d05db29ffec9e @Habbie Habbie committed Apr 21, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 pdns/dnsparser.cc
View
@@ -471,7 +471,7 @@ void PacketReader::getLabelFromContent(const vector<uint8_t>& content, uint16_t&
uint16_t offset=256*(labellen & ~0xc0) + (unsigned int)content.at(frompos++) - sizeof(dnsheader);
// cout<<"This is an offset, need to go to: "<<offset<<endl;
- if(offset >= pos-2)
+ if(offset >= pos)
throw MOADNSException("forward reference during label decompression");
return getLabelFromContent(content, offset, ret, ++recurs);
}

0 comments on commit 2dea55e

Please sign in to comment.