mirror of
https://github.com/yarrick/iodine.git
synced 2024-12-23 05:43:32 +02: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);
|
||||
|
||||
memcpy(buf, packetbuf.data, r);
|
||||
if (r > 0) {
|
||||
memcpy(buf, packetbuf.data, r);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue