solanum-vs-hackint-and-char.../libratbox
Jilles Tjoelker fab79c5d25 libratbox: Fix undefined behaviour advancing pointer beyond end of array.
The C standard does not allow constructing pointers beyond one past the end
of an array. Therefore, if size is an unsigned type (size_t), then
buf + size is never less than buf.

Clang on 32-bit took advantage of the undefined behaviour, causing
segfaults.

Lightly tested.
2014-02-16 16:06:01 +01:00
..
include libratbox: regenerate autotools files 2014-02-08 18:35:24 +00:00
src libratbox: Fix undefined behaviour advancing pointer beyond end of array. 2014-02-16 16:06:01 +01:00
.indent.pro
acinclude.m4 Detect a potential infinite loop in ./configure in AC_DEFINE_DIR. 2012-03-02 01:51:30 +00:00
aclocal.m4 libratbox: regenerate autotools files 2014-02-08 18:35:24 +00:00
ChangeLog Update libratbox. 2008-12-22 12:49:01 +03:00
config.guess Copied libratbox and related stuff from shadowircd upstream. 2008-12-03 02:49:39 +03:00
config.sub Copied libratbox and related stuff from shadowircd upstream. 2008-12-03 02:49:39 +03:00
configure libratbox: regenerate autotools files 2014-02-08 18:35:24 +00:00
configure.ac Revert "libratbox: Remove broken gnutls support." 2013-06-10 12:19:02 -04:00
COPYING
CREDITS
depcomp
INSTALL
install-sh
libratbox.pc.in
ltmain.sh Re-libtoolize. 2012-02-04 04:18:48 -06:00
Makefile.am
Makefile.in libratbox: regenerate autotools files 2014-02-08 18:35:24 +00:00
missing
README Copied libratbox and related stuff from shadowircd upstream. 2008-12-03 02:49:39 +03:00
TODO

This is libircd from ircd-ratbox.  A few notes about this library:

1. Most of this code isn't anywhere near threadsafe at this point.  Don't
   hold your breath on this either.
2. The linebuf code is designed to deal with pretty much 512 bytes per line
   and that is it.  Anything beyond that length unless in raw mode, gets
   discard.  For some non-irc purposes, this can be a problem, but for
   ircd stuff its fine.
3. The helper code when transmitting data between helpers, the same 512 byte
   limit applies there as we recycle the linebuf code for this.