time: Remove alloca() from getdate
authorJoe Simmons-Talbott <josimmon@redhat.com>
Wed, 3 May 2023 16:40:05 +0000 (12:40 -0400)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 5 May 2023 14:55:48 +0000 (10:55 -0400)
commit21f0b087ee10391433d8279e7c6f104fb9ea0eef
tree99ceac5eddee45885884323d01d492f682bcb144
parent642f1b9b3de8d847b43af928107057116eb6e7f1
time: Remove alloca() from getdate

Reduce the usage of alloca() to the bare minimum to avoid the potential
for stack overflow.  Use __strndup to simplify the code.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
time/getdate.c