systemd/coccinelle
Lennart Poettering 2f82562bad alloc-util: add strdupa_safe() + strndupa_safe() and use it everywhere
Let's define two helpers strdupa_safe() + strndupa_safe() which do the
same as their non-safe counterparts, except that they abort if called
with allocations larger than ALLOCA_MAX.

This should ensure that all our alloca() based allocations are subject
to this limit.

afaics glibc offers three alloca() based APIs: alloca() itself,
strndupa() + strdupa(). With this we have now replacements for all of
them, that take the limit into account.
2021-10-14 15:57:52 +02:00
..
bool-cast.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
close-above-stdio.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
cmp.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
const-strlen.disabled licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
debug-logging.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
div-round-up.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
dup-fcntl.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
empty-or-dash.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
empty-or-root.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
empty-to-null.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
empty-to-root.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
enotsup.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
equals-null.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
errno-check.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
errno.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
exit-0.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
flags-set.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
fopen-unlocked.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
free_and_replace.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
hashmap_free.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
htonl.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
in_set.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
iovec-make.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
isempty.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
log-json.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
macros.h licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
malloc_multiply.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
memzero.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
mfree_return.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
mfree.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
no-if-assignments.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
not_in_set.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
o-ndelay.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
reallocarray.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
redundant-if.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
run-coccinelle.sh ci: use LGPLv2+ for all our ci configuration 2021-10-01 14:45:00 +02:00
safe_close-no-if.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
safe_close.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
safe_closedir.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
safe_fclose.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
sd_event_source_disable_unref.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
set_ensure_put.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
strdupa.cocci alloc-util: add strdupa_safe() + strndupa_safe() and use it everywhere 2021-10-14 15:57:52 +02:00
strempty.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
strjoin.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
strjoina.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
strv_free.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
swap-two.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
synthetic-errno.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
take-fd.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
take-ptr.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
while-true.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
xsprintf.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00
zz-drop-braces.cocci licensing: add spdx to our .cocci files 2021-10-01 14:45:00 +02:00