tree-wide: port all calls to alloca() to alloca_safe()

This commit is contained in:
Lennart Poettering
2021-10-14 15:57:52 +02:00
parent 5e76324eea
commit 698cec65c4
6 changed files with 9 additions and 10 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ int fw_iptables_add_masquerade(
mr->rangesize = 1;
/* Create a search mask entry */
mask = alloca(sz);
mask = alloca_safe(sz);
memset(mask, 0xFF, sz);
if (add) {
+1 -1
View File
@@ -35,7 +35,7 @@ static int nscd_flush_cache_one(const char *database, usec_t end) {
l = strlen(database);
req_size = offsetof(struct nscdInvalidateRequest, dbname) + l + 1;
req = alloca(req_size);
req = alloca_safe(req_size);
*req = (struct nscdInvalidateRequest) {
.version = 2,
.type = 10,