Created attachment 193710 [details]
slrn may crash with sigserv trying to parse "Subject:" header what contains unconvertable data as our iconv() function now correctly returns non-zero count of convertable symbols but new/slrn is built with --with-non-gnu-iconv flag and expects zero return value for such error.
This code is located in src/charset.c, function iconv_convert_string().
The flag --with-non-gnu-iconv defines NON_GNU_ICONV and this function is the only place where NON_GNU_ICONV is checked. Due to this problem, unsigned "size_t inbytesleft" variable underflow occurs, negative value turns to large positive leading to incorrect memory accesses later.
Solution is to backout https://svnweb.freebsd.org/ports?view=revision&revision=349278 as base system's iconv(3) function is now compatible with GNU one.
A commit references this bug:
Date: Sat Jun 30 00:49:19 UTC 2018
New revision: 473592
news/slrn: fix crash with SIGSERV in the iconv_convert_string()
Back out r349278 that added --with-non-gnu-iconv trying to solve
our early iconv() inconsistences that are not actual anymore
as it now now correctly returns non-zero count of convertable symbols.
This fixes unsigned underflow in the slrn code turning
negative value to large positive leading to incorrect memory accesses later.
Approved by: johans (maintainer timeout, 1 month)