about summary refs log tree commit diff
path: root/peer.c
AgeCommit message (Collapse)Author
18 hoursSimplify client's buffer overflow HEAD masterNakidai
So I decided to kill a link when there's no IRC message within 512 bytes, because doing so removes code and IMO makes it more clear If peer->recvd == sizeof(peer->buf), then buffer size passed into next read(peer->fd) will be 0, therefore its return value will be 0. Though, this means that link is almost dropped if it sent exactly 512 bytes not containing an \r\n: they can get information, but on next send ircd will close the connection. But this state is unachievable with an IRC client: it either sends a message <= 512 bytes containing an \r\n, or, if one or more bytes longer, well that's already > 512 bytes hence link is still ready to be read and will be kicked after the next poll()
2026-01-04Add codeNakidai