Skip to content

Commit dc02ebf

Browse files
author
Peter van Dijk
committed
allow referencing of compressed label directly before another compressed label, thanks @giganteous
1 parent 15f2a53 commit dc02ebf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pdns/dnsparser.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ void PacketReader::getLabelFromContent(const vector<uint8_t>& content, uint16_t&
471471
uint16_t offset=256*(labellen & ~0xc0) + (unsigned int)content.at(frompos++) - sizeof(dnsheader);
472472
// cout<<"This is an offset, need to go to: "<<offset<<endl;
473473

474-
if(offset >= pos-2)
474+
if(offset >= pos)
475475
throw MOADNSException("forward reference during label decompression");
476476
return getLabelFromContent(content, offset, ret, ++recurs);
477477
}

0 commit comments

Comments
 (0)