If a bad name is fed to vga_getmodenumber() a segfault happens. Reproducible: Always Steps to Reproduce: 1. Try doing a vga_getmodenumber("my_bad_modename"); 2. 3. Actual Results: Segmentation fault Expected Results: The library to return -1 and print "Invalid graphics mode 'my_bad_modename'." The problem is with vgamodesel.c::vga_getmodenumber() having an insufficient buffersize of 3. Bumping the size to 8 fixes the problem. A patch is attached.
Created attachment 301365 [details, diff] vga_getmodenumber buffersize fix
Please go to bug 405411 and check its ebuild
*svgalib-1.9.25-r2 (03 Mar 2012) 03 Mar 2012; Pacho Ramos <pacho@gentoo.org> +files/svgalib-1.9.25-build2.patch, +files/svgalib-1.9.25-fPIC.patch, +files/svgalib-1.9.25-linux2.6.36-r1.patch, +files/svgalib-1.9.25-segfault.patch, +svgalib-1.9.25-r2.ebuild: Respect LDFLAGS (bug #339873 by Andrew Savchenko), install svgalib_helper.h (bug #341393 by Andrew Savchenko), fix build with recent kernels (bug #344663 by Rene Hertell), fix segfault (bug #402831 by O.Sezer). Anyway, this package needs a maintainer to get things fixed sooner. I can be your proxy maintainer if you want: http://www.gentoo.org/proj/en/qa/proxy-maintainers/index.xml