mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 16:19:20 +02:00
Fix bof
This commit is contained in:
parent
18cb02f90f
commit
4588aab71a
3
README
3
README
|
@ -67,7 +67,7 @@ If you have problems, try inspecting the traffic with network monitoring tools
|
||||||
and make sure that the relaying DNS server has not cached the response. A
|
and make sure that the relaying DNS server has not cached the response. A
|
||||||
cached error message could mean that you started the client before the server.
|
cached error message could mean that you started the client before the server.
|
||||||
|
|
||||||
The upstream data is sent gzipped encoded in hexadecimal. DNS protocol allows
|
The upstream data is sent gzipped encoded with Base32. DNS protocol allows
|
||||||
one query per packet, and one query can be max 256 chars. Each domain name part
|
one query per packet, and one query can be max 256 chars. Each domain name part
|
||||||
can be max 63 chars. So your domain name and subdomain should be as short as
|
can be max 63 chars. So your domain name and subdomain should be as short as
|
||||||
possible to allow maximum throughput.
|
possible to allow maximum throughput.
|
||||||
|
@ -91,6 +91,7 @@ iodine has atomic number 53, which happens to be the DNS port number.
|
||||||
THANKS:
|
THANKS:
|
||||||
|
|
||||||
- To kuxien for FreeBSD and OS X testing
|
- To kuxien for FreeBSD and OS X testing
|
||||||
|
- To poplix for code audit
|
||||||
|
|
||||||
|
|
||||||
AUTHORS & LICENSE:
|
AUTHORS & LICENSE:
|
||||||
|
|
6
dns.c
6
dns.c
|
@ -320,11 +320,11 @@ dns_parse_reply(char *outbuf, int buflen, char *packet, int packetlen)
|
||||||
readshort(packet, &data, &class);
|
readshort(packet, &data, &class);
|
||||||
readlong(packet, &data, &ttl);
|
readlong(packet, &data, &ttl);
|
||||||
readshort(packet, &data, &rlen);
|
readshort(packet, &data, &rlen);
|
||||||
readdata(packet, &data, rdata, rlen);
|
rv = MIN(rlen, sizeof(rdata));
|
||||||
|
readdata(packet, &data, rdata, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type == T_NULL && rlen > 2) {
|
if(type == T_NULL && rv > 2) {
|
||||||
rv = MIN(rlen, sizeof(rdata));
|
|
||||||
memcpy(outbuf, rdata, rv);
|
memcpy(outbuf, rdata, rv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue