[sword-devel] Segfault in LZSS code

Bastian Germann bastiangermann at fishpost.de
Sat Feb 27 10:02:20 EST 2021


Hi,

When sword reads a ZIP-compressed zLD module with bad conf file that has 
CompressType=LZSS (or no CompressType), sword segfaults. To reproduce, 
modify Nave's conf file accordingly and start Xiphos, Bibletime, or 
diatheke -b Nave -k ... (tried on Debian bullseye):

(gdb) bt
#0  0x00007ffff7b6600d in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff7e83fc2 in sword::zStr::getCompressedText(long, long, 
char**) const () from /usr/lib/x86_64-linux-gnu/libsword.so.1.9.0
#2  0x00007ffff7e842a4 in sword::zStr::getText(long, char**, char**) 
const () from /usr/lib/x86_64-linux-gnu/libsword.so.1.9.0
#3  0x00007ffff7f2725f in sword::zLD::getEntry(long) const () from 
/usr/lib/x86_64-linux-gnu/libsword.so.1.9.0
#4  0x00007ffff7f27507 in non-virtual thunk to 
sword::zLD::getRawEntryBuf() const () from 
/usr/lib/x86_64-linux-gnu/libsword.so.1.9.0
#5  0x00007ffff7e69e11 in sword::SWModule::renderText(char const*, int, 
bool) const () from /usr/lib/x86_64-linux-gnu/libsword.so.1.9.0
#6  0x00007ffff7e6a1db in sword::SWModule::renderText() () from 
/usr/lib/x86_64-linux-gnu/libsword.so.1.9.0
#7  0x0000555555560167 in doquery(unsigned long, unsigned char, unsigned 
char, unsigned long, unsigned char, char const*, char const*, char 
const*, char const*, std::ostream*, char const*, signed char) ()
#8  0x000055555555d12c in main ()

Thanks for investigating. Regards,
Bastian


More information about the sword-devel mailing list