On Wed, Apr 05, 2023 at 05:03:26PM +0100, Bruce Richardson wrote: > Since variable length arrays (VLAs) are potentially insecure and > unsupported by some compilers, rework the code to remove their use. As > with previous changes to remove VLAs in the telemetry code, this > function uses two methods to avoid modifying the buffer when adding to > it fails: > * if there are only a few characters in the buffer, save them off to > restore on failure, then use the buffer as-is, > * otherwise use malloc rather than a VLA to allocate a temporary buffer > and copy from that on success only. > > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> > ---
Acked-by: Tyler Retzlaff <roret...@linux.microsoft.com>