mirror of
https://github.com/yarrick/iodine.git
synced 2025-02-27 03:31:30 +00:00
No segfaults please
This commit is contained in:
parent
6864263aac
commit
16c46c3183
1 changed files with 3 additions and 1 deletions
4
dns.c
4
dns.c
|
@ -618,7 +618,9 @@ dnsd_read(int fd, char *buf, int buflen)
|
||||||
|
|
||||||
r = decodepacket(name, &packetbuf);
|
r = decodepacket(name, &packetbuf);
|
||||||
|
|
||||||
memcpy(buf, packetbuf.data, r);
|
if (r > 0) {
|
||||||
|
memcpy(buf, packetbuf.data, r);
|
||||||
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue