opnsense-src/lib
Ed Maste 33482dae89 libc: fix undefined behavior from signed overflow in strstr and memmem
unsigned char promotes to int, which can overflow when shifted left by
24 bits or more. this has been reported multiple times but then
forgotten. it's expected to be benign UB, but can trap when built with
explicit overflow catching (ubsan or similar). fix it now.

note that promotion to uint32_t is safe and portable even outside of
the assumptions usually made in musl, since either uint32_t has rank
at least unsigned int, so that no further default promotions happen,
or int is wide enough that the shift can't overflow. this is a
desirable property to have in case someone wants to reuse the code
elsewhere.

musl commit: 593caa456309714402ca4cb77c3770f4c24da9da

Obtained from:	musl
2020-11-19 00:03:15 +00:00
..
atf
clang Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp 2020-10-12 21:35:29 +00:00
csu Add C startup code tests for PIE binaries. 2020-11-10 19:09:35 +00:00
flua flua: Add a libjail module 2020-10-24 17:08:59 +00:00
geom Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
googletest Significantly reduce compile time for googletest internal tests 2020-10-28 11:54:04 +00:00
kyua
lib9p Add virtio-9p (aka VirtFS) filesystem sharing to bhyve. 2020-10-03 19:05:13 +00:00
lib80211 80211: non-functional changes 2020-10-07 21:56:58 +00:00
libalias libalias: retire cuseeme support 2020-05-16 02:29:10 +00:00
libarchive build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00
libauditd
libbe libbe(3): install MLINKS for all of the functions provided 2020-10-18 23:58:40 +00:00
libbearssl Revert that! 2020-07-19 23:56:19 +00:00
libbegemot
libblacklist
libblocksruntime
libbluetooth
libbsdstat
libbsm
libbsnmp Add missing src.opts.mk include 2020-11-13 23:18:04 +00:00
libbz2
libc libc: fix undefined behavior from signed overflow in strstr and memmem 2020-11-19 00:03:15 +00:00
libc++ Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libc++experimental
libc_nonshared
libcalendar
libcam Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libcapsicum Add missing FreeBSD functions to -legacy when building on macOS/Linux 2020-08-25 13:23:31 +00:00
libcasper [libcasper] Update cap_dns API to not trigger unused variable warnings when disabled 2020-10-13 22:49:43 +00:00
libclang_rt Enable SUBDIR_PARELLEL in lib/libclang_rt 2020-10-12 10:42:33 +00:00
libcom_err
libcompat
libcompiler_rt Follow-up r364753 by only using arm's stdatomic.c implementation, as it 2020-09-10 16:47:12 +00:00
libcrypt Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libcuse
libcxxrt Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libdevctl
libdevdctl libdevdctl: Force full match of "timestamp" field name 2020-06-23 16:29:59 +00:00
libdevinfo devinfo: add man page links 2020-08-04 21:09:36 +00:00
libdevstat
libdl
libdpv
libdwarf
libedit
libefivar libefivar: define MDE_CPU_RISCV64 2020-07-06 17:47:29 +00:00
libelf libelf: add compression header support 2020-10-23 16:35:23 +00:00
libelftc
libevent1 rename in-tree libevent v1 to libevent1 2020-05-28 22:05:50 +00:00
libexecinfo
libexpat
libfetch Replace literal uses of /usr/local in C sources with _PATH_LOCALBASE 2020-10-27 11:29:11 +00:00
libfigpar
libgcc_eh After r364423, which ensures the callbacks that dl_iterate_phdr(3) 2020-08-25 20:07:11 +00:00
libgcc_s
libgeom
libgpio
libgssapi libgssapi: modernize static string array use 2020-10-13 17:14:30 +00:00
libiconv_modules Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libifconfig Move list_cloners to libifconfig 2020-10-21 05:27:25 +00:00
libipsec Refer to AES-CBC as "aes-cbc" rather than "rijndael-cbc" for IPsec. 2020-06-04 22:58:37 +00:00
libipt
libjail
libkiconv
libkvm Split out cwd/root/jail, cmask state from filedesc table 2020-11-17 21:14:13 +00:00
libldns
liblua Fix -Wundef warnings when building liblua 2020-08-25 13:30:34 +00:00
liblutok
liblzma liblzma: Make liblzma use libmd implementation of SHA256. 2020-06-20 21:32:07 +00:00
libmagic Fix installation of magic file. 2020-06-17 15:57:59 +00:00
libmd Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
libmemstat malloc: move malloc_type_internal into malloc_type 2020-11-06 21:33:59 +00:00
libmilter
libmp
libmt Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
libnetbsd
libnetgraph Fix SYNPOSIS section to point to the proper include directive. 2020-05-15 12:04:39 +00:00
libnetmap [libnetmap] Fix 32 bit compilation under gcc-6.4 2020-11-02 15:01:37 +00:00
libngatm
libnv Fix libnv build post rename 2020-06-27 02:17:04 +00:00
libomp
libopenbsd Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libopencsd Update opencsd to 0.14.2 2020-06-17 10:42:20 +00:00
libopie
libpam Don't explicitly specify c99 or gnu99 as the default is now gnu99. 2020-08-17 05:57:02 +00:00
libpathconv Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
libpcap
libpe
libpjdlog
libpmc libpmc: add support for POWER8/9 PMCs 2020-11-05 16:41:28 +00:00
libpmcstat pmcstat: fix PPC kernel symbol resolution 2020-11-05 16:47:23 +00:00
libproc Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libprocstat Split out cwd/root/jail, cmask state from filedesc table 2020-11-17 21:14:13 +00:00
libradius Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
libregex libregex: disable some of the unimplemented test cases for now 2020-08-04 02:16:43 +00:00
librpcsec_gss Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
librpcsvc
librss
librt
librtld_db librtld_db: Handle anonymous mappings below the first file mapping. 2020-06-05 18:44:14 +00:00
libsbuf Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libsdp
libsecureboot veloader: insist on verifying .4th .lua etc 2020-08-21 00:27:06 +00:00
libsm Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details 2020-07-15 18:28:54 +00:00
libsmb
libsmdb Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details 2020-07-15 18:28:54 +00:00
libsmutil
libsqlite3 [PowerPC64LE] Pass our byte order to the sqlite3 build. 2020-09-23 02:17:44 +00:00
libssp
libssp_nonshared
libstats
libstdbuf
libstdthreads
libsysdecode Make linux_errtbl[] static. 2020-11-03 19:12:33 +00:00
libtacplus
libtelnet
libthr _umtx_op: fix a compat32 bug in UMTX_OP_NWAKE_PRIVATE 2020-11-17 03:34:01 +00:00
libthread_db
libucl Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libufs Update the libufs cgget() and cgput() interfaces to have a similar 2020-09-19 22:48:30 +00:00
libugidfw Deduplicate fsid comparisons 2020-05-21 01:55:35 +00:00
libulog
libunbound MFV r361322: 2020-05-21 21:00:46 +00:00
libusb Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
libusbhid USB HID descriptors may push/pop the current state to allow 2020-06-05 07:57:16 +00:00
libutil Add function getlocalbase() to libutil. 2020-11-18 19:44:30 +00:00
libveriexec
libvgl
libvmmapi vmm(4), bhyve(8): Expose kernel-emulated special devices to userspace 2020-05-15 15:54:22 +00:00
libwrap
libxo build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00
liby
libypclnt
libz
libzstd pkgbase: Move libprivatezstd from utilities to runtime 2020-11-12 14:04:08 +00:00
msun msun tests: use standard floating-point exception flags on lrint and fenv tests 2020-11-18 19:23:30 +00:00
ncurses Pass the full CFLAGS to cpp for MKlib_gen.sh. 2020-08-03 17:53:15 +00:00
ofed build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00
tests
Makefile flua: Add a libjail module 2020-10-24 17:08:59 +00:00
Makefile.inc build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00