No segfaults please

This commit is contained in:
Bjorn Andersson 2006-06-11 17:26:13 +00:00
parent 6864263aac
commit 16c46c3183

4
dns.c
View file

@ -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;
} }