pike.git/
lib/
modules/
Protocols.pmod/
DNS.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2013-08-09
2013-08-09 12:42:29 by Andreas Petersson <andreas@sbin.se>
d02efa69e2280b5780bb906e4b50aee797c138d2 (
3
lines) (+
3
/-
0
)
[
Show
|
Annotate
]
Branch:
7.9
Handle truncated labels in DNS.pmod.
648:
array(int) next=({12}); m->qd = allocate(m->qdcount); for(int i=0; i<m->qdcount; i++) {
+
if (next[0] > sizeof(s))
+
error("Bad DNS request, not enough data\n");
m->qd[i]=(["name":decode_domain(s,next)]); sscanf(s[next[0]..next[0]+3],"%2c%2c",m->qd[i]->type, m->qd[i]->cl); next[0]+=4;