|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/4] correct libxl_write_exactly sizeof
sizeof is wrongly used in libxl_write_exactly function, using
strlen instead.
CID: 1358110
CID: 1358109
Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
CC: Simon Cao <caobosimon@xxxxxxxxx>
CC: George Dunlap <george.dunlap@xxxxxxxxxx>
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
tools/libxl/libxl_pvusb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/libxl/libxl_pvusb.c b/tools/libxl/libxl_pvusb.c
index 04e41b4..45117cf 100644
--- a/tools/libxl/libxl_pvusb.c
+++ b/tools/libxl/libxl_pvusb.c
@@ -1025,7 +1025,7 @@ static int unbind_usbintf(libxl__gc *gc, const char *intf)
goto out;
}
- if (libxl_write_exactly(CTX, fd, intf, sizeof(intf), path, intf)) {
+ if (libxl_write_exactly(CTX, fd, intf, strlen(intf), path, intf)) {
rc = ERROR_FAIL;
goto out;
}
@@ -1065,7 +1065,7 @@ static int bind_usbintf(libxl__gc *gc, const char *intf,
const char *drvpath)
goto out;
}
- if (libxl_write_exactly(CTX, fd, intf, sizeof(intf), path, intf)) {
+ if (libxl_write_exactly(CTX, fd, intf, strlen(intf), path, intf)) {
rc = ERROR_FAIL;
goto out;
}
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |