XmbTextListToTextProperty() can SEGV with invalid/corrupt locale data
It seems possible to crash Xlib with invalid/corrupt locale data.
Attached is an example and below are steps to reproduce. Tested on libX11-1.8.6 built from source:
1. Build libx11-1.8.6 from source
2. Replace nls/C/XLC_LOCALE with attached version
3. Change directory into src/.libs/ and execute:
$ gdb -ex "set exec-wrapper env LC_ALL=C LD_LIBRARY_PATH=$PWD XLOCALEDIR=../../nls/" /usr/bin/xpdf.real
Appears to be a NULL pointer dereference.