pkgconf/libpkgconf
A. Wilcox 9b7affe0b1
tuple: Ensure buf length is always >= 1 in dequote
If a key is defined with no value, dequote will allocate a buffer with a
length of 0.  Since the buffer's length is 0, any manipulation of its
content is UB.

Example .pc file:

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

xcflags=
xlibs= -lSM -lICE  -lX11

Name: Obt
Description: Openbox Toolkit Library
Version: 3.6
Requires: glib-2.0 libxml-2.0
Libs: -L${libdir} -lobt ${xlibs}
Cflags: -I${includedir}/openbox/3.6 ${xcflags}

Output using pkgconf 1.5.2 on x86_64 Linux/musl:

% pkgconf --cflags obt-3.5
-I/usr/include/openbox/3.6 \�\\�I\�\ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2
2018-07-28 19:06:33 -05:00
..
CMakeLists.txt libpkgconf: refactor out the rfc822 message parser so that the cross-personality code can share it 2018-05-09 21:21:39 -05:00
argvsplit.c libpkgconf: argvsplit: fix escape handling in tokenizer (closes #163) 2017-12-14 22:41:14 -06:00
audit.c libpkgconf: document audit module 2016-12-10 19:28:34 -06:00
bsdstubs.c Minimal tweaks to compile with Visual C 2015 2017-06-04 19:19:55 -07:00
bsdstubs.h headers: add C++ wrappers (closes #136) 2017-09-13 14:35:28 -05:00
cache.c libpkgconf: cache: fix refcount issue exposed by recent depgraph solver changes 2017-12-08 13:39:40 -06:00
client.c environment variables for system paths should override compiled-in defaults 2018-06-25 06:36:57 -04:00
config.h.cmake.in First draft of cmake port 2017-06-04 17:44:37 -07:00
config.h.meson Experiment to build with Meson (#119) 2017-06-19 19:03:00 -05:00
dependency.c libpkgconf: dependency: preference uncoloured nodes in event of a dependency collision 2018-03-18 19:03:18 -05:00
fileio.c libpkgconf: fileio: fix quoting logic for double backslash case (ref #140) 2017-09-23 00:19:16 -05:00
fragment.c libpkgconf: fragment: revert the quoting changes, but not the lexing changes 2018-01-22 15:13:14 -06:00
iter.h headers: add C++ wrappers (closes #136) 2017-09-13 14:35:28 -05:00
libpkgconf-api.h libpkgconf: api: handle DLL_EXPORT libtool case on mingw (closes #141) 2017-09-23 00:00:43 -05:00
libpkgconf.h libpkgconf: personality: remove const from the default personality, since it's not really const 2018-05-09 22:52:27 -05:00
meson.build Experiment to build with Meson (#119) 2017-06-19 19:03:00 -05:00
parser.c libpkgconf: refactor out the rfc822 message parser so that the cross-personality code can share it 2018-05-09 21:21:39 -05:00
path.c libpkgconf: path: add path list copying function 2018-05-09 16:35:21 -05:00
personality.c use pkgconf_strlcpy 2018-06-14 14:46:34 -05:00
pkg.c pkg: give a correctly sized vtable to the parser 2018-06-16 16:35:44 -05:00
queue.c libpkgconf: dependency: allow dependency nodes to be colored with traits 2018-03-18 18:03:33 -05:00
stdinc.h libpkgconf: add support for Haiku 2018-04-05 10:02:54 -05:00
tuple.c tuple: Ensure buf length is always >= 1 in dequote 2018-07-28 19:06:33 -05:00
win-dirent.h win-dirent.h: MIT-licensed port of dirent to win32 from https://github.com/tronkko/dirent 2017-06-04 19:19:01 -07:00