libxc: adjust string size calculations in xc_{,de,test_}assign_dt_device()

In preparation for a hypervisor change also include the nul terminator in
the size calculations.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
This commit is contained in:
Jan Beulich committed 2026-07-01 14:10:10 +02:00
1 parent e6b68789d4
commit 873bc77d3d
1 file changed
+3 -3
+3 -3
View File
@@ -1592,7 +1592,7 @@ int xc_assign_dt_device(
char *path)
{
int rc;
size_t size = strlen(path);
size_t size = strlen(path) + 1;
struct xen_domctl domctl = {};
DECLARE_HYPERCALL_BOUNCE(path, size, XC_HYPERCALL_BUFFER_BOUNCE_IN);
@@ -1624,7 +1624,7 @@ int xc_test_assign_dt_device(
char *path)
{
int rc;
size_t size = strlen(path);
size_t size = strlen(path) + 1;
struct xen_domctl domctl = {};
DECLARE_HYPERCALL_BOUNCE(path, size, XC_HYPERCALL_BUFFER_BOUNCE_IN);
@@ -1652,7 +1652,7 @@ int xc_deassign_dt_device(
char *path)
{
int rc;
size_t size = strlen(path);
size_t size = strlen(path) + 1;
struct xen_domctl domctl = {};
DECLARE_HYPERCALL_BOUNCE(path, size, XC_HYPERCALL_BUFFER_BOUNCE_IN);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.