On 5/5/21 2:10 PM, Philippe Mathieu-Daudé wrote:
We know 'pf.bytes_per_pixel' will be at most 'VNC_SERVER_FB_BYTES'
(which is actually 4 bytes for 32bpp). Instead of having the compiler
use variable-length array, use this 'small' maximum length and
autofree to allocate the buffer on the heap.

Signed-off-by: Philippe Mathieu-Daudé<phi...@redhat.com>
---
  ui/vnc-enc-hextile-template.h | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Wait, you know the value is small (max 4), and you don't want to allocate a constant 1k on the stack?


r~

Reply via email to