]> jfr.im git - irc/charybdis-ircd/charybdis.git/commit
ircd: s_conf: fix use of strlcpy in strip_tabs
authorSimon Arlott <sa.me.uk>
Sun, 25 Jun 2017 18:48:49 +0000 (19:48 +0100)
committerSimon Arlott <sa.me.uk>
Sun, 25 Jun 2017 18:54:39 +0000 (19:54 +0100)
commit62c0ac412468732d1918df633ecd96fc1f9f1a9c
treedfbff0aaffe9928b5e5400c7b3a6bcf01de80cfa
parent789bb31c92b9a674f735bc9165119e086b2b8bdf
ircd: s_conf: fix use of strlcpy in strip_tabs

strlcpy should be called with the size of the destination buffer, not
the length of the source string.

When the source is an empty string, the destination buffer isn't
written at all, resulting in it trying to output uninitialised data.

This could also cause a buffer overflow on very long invalid config
lines.
src/s_conf.c