]> Savannah Git Hosting - gnulib.git/commit
nstrftime: suggest to glibc how to avoid alloca
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 May 2023 17:27:40 +0000 (10:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 May 2023 19:04:35 +0000 (12:04 -0700)
commit0a4e0cab0dbb2a70e26484e32378784b5106ae08
tree4e9a5f08b9250ba4fb23625803cc63b5862e6426
parent8c4d0fbf4c45df8e86acbb338b154930c5498dc3
nstrftime: suggest to glibc how to avoid alloca

* lib/nstrftime.c (widen) [COMPILE_WIDE]: Remove.
(__strftime_internal) [COMPILE_WIDE): Instead of converting the
multibyte time zone abbreviation into a potentially unbounded
alloca buffer, convert it directly into the output buffer.
Although this code is not used in Gnulib, this can help the glibc
developers avoid the problem on the glibc side.
ChangeLog
lib/nstrftime.c