freebsd-dev/lib
Bruce Evans fbc6daa1dc Fix buffer overruns in modes with color depth more than 8.
Support for 16-bit and 32-bit Truecolor modes was supposed to be
complete in r70991 of main.c and in nearby revisions for other files, but
it was broken by the overruns in most cases (all cases were the mouse
is enabled, and most cases where bitmaps are used).  r70991 also
uninintentionally added support for depths 9-15, 17-23 and 25-31.
Depth 24 was more obviously broken and its support is ifdefed out.  In
the other ranges, only depth 15 is common.  It was broken by buffer
overruns in all cases.

bitmap.c:
- the static buffer was used even when it was too small (but it was
  large enough to often work accidentally in depth 16)
- the size of the dynamically allocated buffer was too small
- the sizing info bitmap->PixelBytes was not inititialzed in the bitmap
  constructor.  It often ended up as 0 for MEMBUFs, so using it in more
  places gave more null pointer accesses.  (It is per-bitmap, but since
  conversion between bitmaps of different depths is not supported (except
  from 4 bits by padding to 8), it would work better if it were global.)

main.c:
- depths were rounded down instead of up to a multiple of 8, so PixelBytes
  was 1 too small for depths above 8 except 16, 24 and 32.
- PixelBytes was not initialized for 4-bit planar modes.  It isn't really
  used for frame buffer accesses in these modes, but needs to be 1 in
  MEMBUF images.

mouse.c:
- the mouse cursor buffers were too small.

vgl.h:
- PixelBytes was not initialized in the static bitmap constructor.  It
  should be initialized to the value for the current mode, but that is
  impossible in a static constructor.  Initialize it to -1 so as to
  fail if it is used without further initialization.

All modes that are supposed to be supported now don't crash in
nontrivial tests, and almost work.  Missing uses of PixelBytes now
give in-bounds wrong pointers instead of overruns.  Misconversions of
bitmaps give multiple miscolored mouse cursors instead of 1 white one,
and similarly for bitmaps copied through a MEMBUF.
2019-03-24 18:57:03 +00:00
..
atf
clang Pull in r352826 from upstream lld trunk (by Fangrui Song): 2019-03-20 20:57:11 +00:00
csu Create crtsavres.o for powerpc builds 2019-01-12 21:29:54 +00:00
geom Add a “skip_dsn” option to g_part's bootcode verb to prevent g_part_mbr 2018-11-27 14:58:19 +00:00
googletest googletest: backport GTEST_SKIP to googletest 1.8.1 2019-03-20 23:15:58 +00:00
lib80211
libalias
libarchive MFV r344063: 2019-02-12 23:24:45 +00:00
libauditd
libbe libbe(3): Fix be_destroy behavior w.r.t. deep BE snapshots and -o 2019-02-13 04:19:08 +00:00
libbearssl Add libbearssl 2019-02-26 05:59:22 +00:00
libbegemot
libblacklist
libblocksruntime
libbluetooth
libbsdstat
libbsm
libbsnmp
libbz2
libc Add descriptions for sysctls in kern_mib.c and sysctl.3 which lack them. 2019-03-23 19:53:15 +00:00
libc_nonshared
libc++ Update libc++ build glue, and ObsoleteFiles. 2019-01-22 19:03:51 +00:00
libc++experimental
libc++fs
libcalendar
libcam
libcapsicum List caph_limit_stream() in the synopsis. 2019-01-21 20:56:29 +00:00
libcasper r341692 changed cap_syslog(3) to preserve the stdio descriptors inherited 2019-02-06 04:36:28 +00:00
libclang_rt Update compiler-rt build glue. 2019-01-22 20:08:25 +00:00
libcom_err
libcompat
libcompiler_rt
libcrypt
libcuse
libcxxrt
libdevctl Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
libdevdctl
libdevinfo
libdevstat
libdl
libdpv
libdwarf
libedit libedit: Avoid out of bounds read in 'bind' command 2019-01-16 21:59:18 +00:00
libefivar Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
libelf Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
libelftc Update to ELF Tool Chain r3668 2019-01-10 14:35:23 +00:00
libevent
libexecinfo
libexpat
libfetch When deciding whether to send the complete URL or just the document part, 2018-11-27 16:23:17 +00:00
libfigpar Slightly improve previous commit that silenced a Clang Scan warning. 2019-01-26 22:24:15 +00:00
libgcc_eh Move libunwind out of contrib/llvm/projects. 2019-03-12 16:41:17 +00:00
libgcc_s
libgeom
libgpio
libgssapi
libiconv_modules
libifconfig Make libifconfig INTERNALLIB 2019-02-25 18:22:20 +00:00
libipsec
libipt
libjail Rename fuse(4) to fusefs(4) 2019-03-20 21:48:43 +00:00
libkiconv
libkvm Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
libldns
liblzma Enable use of Capsicum sandbox when there is only one 2019-01-09 05:30:46 +00:00
libmagic
libmd
libmemstat With r343051 UMA switched from atomic counts to counter(9) and now kernel 2019-02-18 21:27:13 +00:00
libmilter
libmp
libmt Add IBM TS1160 density codes to libmt and the mt(1) man page. 2019-03-04 14:30:37 +00:00
libnandfs
libnetbsd
libnetgraph
libngatm
libnv libnv: fix memory leaks 2019-02-10 23:28:55 +00:00
libomp Remove --as-needed from the linker flags for libomp.so, as these 2019-03-18 19:56:00 +00:00
libopenbsd Allow bootstrapping libopenbsd on Linux 2018-12-05 10:58:02 +00:00
libopencsd
libopie
libpam
libpathconv
libpcap
libpe
libpjdlog
libpmc Fix deterministic builds by sorting input to fts in jevents 2019-02-05 00:31:25 +00:00
libpmcstat
libproc
libprocstat Bump SPECNAMELEN to MAXNAMLEN. 2019-01-27 00:46:06 +00:00
libradius
libregex
librpcsec_gss
librpcsvc
librss
librt
librtld_db
libsbuf
libsdp Add support for Audio Sink and Audio Source profiles to sdpd(8). 2019-01-30 09:44:54 +00:00
libsecureboot Extend libsecureboot(old libve) to obtain trusted certificates from UEFI and implement revocation 2019-03-06 06:39:42 +00:00
libsm
libsmb
libsmdb
libsmutil
libsqlite3 Disable FTS3, FTS4, and RTREE in bundled and private sqlite3. 2019-01-12 17:56:23 +00:00
libstdbuf
libstdthreads
libsysdecode Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
libtacplus
libtelnet
libthr Have pthread_cond_destroy() return EBUSY if the condvar has waiters. 2019-03-08 21:07:08 +00:00
libthread_db
libucl
libufs Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
libugidfw
libulog
libunbound
libusb Fix typos in libusb. 2019-03-05 14:47:15 +00:00
libusbhid
libutil Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
libveriexec
libvgl Fix buffer overruns in modes with color depth more than 8. 2019-03-24 18:57:03 +00:00
libvmmapi
libwrap
libxo
liby
libypclnt
libz Add zdopen(3) to complement zopen(3). 2018-12-06 20:03:06 +00:00
libzstd Update to Zstandard 1.3.8 2018-12-29 21:18:01 +00:00
msun Replace calls to sin(x) and cos(x) with a single call to sincos(). 2019-02-10 08:46:07 +00:00
ncurses
ofed
tests
Makefile Enable building libomp.so for 32-bit x86. This is done by selectively 2019-03-18 21:04:28 +00:00
Makefile.inc