mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
e6b68789d4
commit
873bc77d3d
1 file changed
+3
-3
@@ -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);
|
||||
|
||||
|
||||