On 08/01/2015 00:25, Brian Eliassen wrote:
I'm doing a standard build on Solaris 10 with Dovecot 2.2.15 without anything fancy:
./configure make make check make install
Configure output looks like this:
Install prefix . : /usr/local
Oooh, I suggest you use /opt
./configure
--prefix=${PREFIX}
--sysconfdir=/etc/opt/${PREFIX}
--localstatedir=/var/opt/${PREFIX}
...
$ man -s 5 filesystem
::stack
$ mdb test-http-auth core
Loading modules: [ libc.so.1 ld.so.1 ]
libc.so.1strlen+0x50(29487, ffbffb00, ffbff43d, 0, 0, 0) libc.so.1
vsnprintf+0x70(4f2c0, 10f, 29478, ffbffaf8, 10, ff1c7078)
t_noalloc_strdup_vprintf+0x3c(4f2c0, ffbffaf8, ffbffa2c, 1, 19, 0)
p_strdup_vprintf+0xc(4cb90, 29478, ffbffaf8, ff1c759c, 4cc38, 4cb8c)
t_strdup_printf+0x38(29478, 0, 0, 61fefeff, 80808080, 1010101)
Spot the zeros. It's doing the equivalent of 'vsnprintf(s, "%s", 0);'.
The check will run by changing the test code and not attempting to print nulls, patch file attached. I've not thought about this deeply and this is no more than a hack to get the test to run, I didn't study the result.
On face value the core dump says dovecot has failed the test because its string functions don't take nulls, that is if dovecot ever sends them nulls which I can't say other than dovecot does run without dumping core. If there is the possibility nulls need to be printed the dovecot functions in src/lib/strfuncs.c need fixing.