aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-25 00:02:51 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-25 00:02:51 -0500
commit77bf161b55dbf340f4498ad26eef3fd7a0dfbcdc (patch)
tree830096d789f04cb9e7adb9786481280efa8df37f /meson.build
parentar: handle invalid extended filename offsets (diff)
downloadpax-utils-77bf161b55dbf340f4498ad26eef3fd7a0dfbcdc.tar.gz
pax-utils-77bf161b55dbf340f4498ad26eef3fd7a0dfbcdc.tar.bz2
pax-utils-77bf161b55dbf340f4498ad26eef3fd7a0dfbcdc.zip
ar: switch from alloca to malloc
If alloca allocates too much stack space, program behavior is undefined, and basically we segfault. There is no way to check whether this will happen ahead of time, so our only choice is to switch to malloc. If we try to allocate too much memory from the heap, we'll get a NULL pointer, and we can diagnose & exit ourselves. Kind of sucks as alloca was a perfect fit here, but since the size is coming directly from user input, we can't trust it is always "reasonable". Bug: https://bugs.gentoo.org/890579 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build1
1 files changed, 0 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index e891d98..319e3de 100644
--- a/meson.build
+++ b/meson.build
@@ -44,7 +44,6 @@ foreach x : [
'linux/seccomp.h',
'linux/securebits.h',
'sys/prctl.h',
- 'alloca.h',
'elf-hints.h',
'glob.h',
]