Hi, I noticed in ncurses-5.9/ncurses/tinfo/lib_ti.c, in the functions tigetnum(), tigetflag() and tigetstr(), the variable "j" is not initialized.
If NCURSES_XNAMES is not defined (because --disable-tcap-names was used), then j can be used without being ever initialized. In that case it can happen to be a large random positive number and cause a crash.
I noticed this when compiling the "rogue" demo for OSv (
http://osv.io) with gcc 4.9.1.
I attach a trivial patch fixing this bug.