chiark / gitweb /
util: introduce memmem_safe() and make use of it
authorLennart Poettering <lennart@poettering.net>
Thu, 14 May 2015 09:30:59 +0000 (11:30 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 08:56:08 +0000 (09:56 +0100)
commit3840736340c8fc5fe181630f6bc623a0f9f864df
tree50434fc9e003f6345db297eb166894f15eb72806
parent24f59866c30d273ef47365c15ffcd1f86b8f019e
util: introduce memmem_safe() and make use of it

GNU memmem() requires a nonnull first parameter. Let's introduce
memmem_safe() that removes this restriction for zero-length parameters,
and make use of it where appropriate.

http://lists.freedesktop.org/archives/systemd-devel/2015-May/031705.html
src/libelogind/sd-bus/bus-socket.c
src/shared/util.h