]> xenbits.xensource.com Git - xen.git/commit
init-dom0less: better snprintf checks
authorStefano Stabellini <stefano.stabellini@xilinx.com>
Tue, 24 May 2022 23:35:44 +0000 (16:35 -0700)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Tue, 31 May 2022 20:01:24 +0000 (13:01 -0700)
commit09a6a71097e3e7d28eaa0f55e8f2c4b879c299f5
treeb7e1ee7406cce0ead77cf472bef0e4c7d4874dd8
parent49dd52fb1311dadab29f6634d0bc1f4c022c357a
init-dom0less: better snprintf checks

snprintf returns the number of characters that would have been written
to the final string if enough space had been available. A return value
of size or more means that the output was truncated.

Add a check for that in init-dom0less.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Reviewed-by: Michal Orzel <michal.orzel@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
tools/helpers/init-dom0less.c