Hi,
It seems following modified/corrupted xterm-256color file (attached) seems to cause a crash in the tgetstr() function from libtinfo.so.6:
$ cd ~
$ mkdir -p .terminfo/x/
$ cp xterm-256color .terminfo/x/
$ vim
Tested on Ubuntu 23.04. I think the corrupted file causes convert_strings() to write a NULL entry to the tp->ext_Names array. Later, tgetstr() reads the value but assumes it is non-NULL leading to a crash (NULL pointer dereference). It is probably unlikely that the xterm-256color file would be directly modified by an end-user though.
Cheers, -Greg.