]> git.ipfire.org Git - thirdparty/coreutils.git/commit
basenc: allocate buffers on heap
authorAssaf Gordon <assafgordon@gmail.com>
Sat, 5 Jan 2019 23:22:41 +0000 (16:22 -0700)
committerAssaf Gordon <assafgordon@gmail.com>
Sun, 6 Jan 2019 00:14:07 +0000 (17:14 -0700)
commitd045ce5166c06829ee5a63a33e120fe5ee5b83d4
treedac06a27105fd744e013ce73c8db9da7845eff55
parentdaaae12e3b56ebc51202f5b4d5b40be61982cd81
basenc: allocate buffers on heap

Allocate the encoding/decoding buffers dynamically on the heap instead
of using variable-length-array (VLA) on the stack.
Discussed in https://lists.gnu.org/r/coreutils/2019-01/msg00004.html .

* src/basenc.c (do_encode,do_decode): Allocate inbuf/outbuf using
xmalloc, and free if using LINT.
src/basenc.c