Permalink
Browse files

allow referencing of compressed label directly before another compres…

…sed label, thanks @giganteous
  • Loading branch information...
1 parent 15f2a53 commit dc02ebf65ab41ba3c84b05d8d7f1505695adcaf7 @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 dc02ebf

Please sign in to comment.