Re: [PATCH v3 2/5] telemetry: remove variable length array in printf fn

2023-04-07 Thread Tyler Retzlaff
On Wed, Apr 05, 2023 at 05:03:23PM +0100, Bruce Richardson wrote: > The json_snprintf function, used to add json characters on to a buffer, > leaving the buffer unmodified in case of error, used a variable length > array to store the data temporarily while checking for overflow. VLAs > can be unsaf

[PATCH v3 2/5] telemetry: remove variable length array in printf fn

2023-04-05 Thread Bruce Richardson
The json_snprintf function, used to add json characters on to a buffer, leaving the buffer unmodified in case of error, used a variable length array to store the data temporarily while checking for overflow. VLAs can be unsafe, and are unsupported by some compilers, so remove use of the VLA. For t