setsourcefilter: Replace alloca with a scratch_buffer.
commitd9055634a34d4bcb242f84f36c9a7bb1c4019076
authorJoe Simmons-Talbott <josimmon@redhat.com>
Tue, 16 May 2023 13:45:49 +0000 (16 09:45 -0400)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 29 May 2023 13:16:00 +0000 (29 09:16 -0400)
tree9ffca92c8accf529e527638b17cc00928e15177d
parent79b2667d1eb06c6503c22f2f323c1c574ac5917b
setsourcefilter: Replace alloca with a scratch_buffer.

Use a scratch_buffer rather than either alloca or malloc to reduce the
possibility of a stack overflow.

Suggested-by: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/unix/sysv/linux/setsourcefilter.c