about summary refs log tree commit diff
path: root/ircd.h
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2026-01-29 19:07:11 +0300
committerNakidai <nakidai@disroot.org>2026-01-29 19:07:11 +0300
commit4060d0d0d7ee06ed6dad834dbb12f4381489aec0 (patch)
tree280b663511228dfdf439a2b4444ee5fa6c08d1a4 /ircd.h
parent9436897bfb8b5f72109667d86aed06d9a9d1a693 (diff)
downloadlibreircd-master.tar.gz
libreircd-master.zip
Simplify client's buffer overflow HEAD master
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()
Diffstat (limited to 'ircd.h')
0 files changed, 0 insertions, 0 deletions