mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
python/xc: fix out of bounds array access
Writing a NUL terminator here isn't even necessary, since snprintf() already guarantees proper termination. Signed-off-by: Jan Beulich <jbeulich@novell.com>
This commit is contained in:
1 parent
f606c65a53
commit
56d6b7ac5d
1 file changed
-1
@@ -58,7 +58,6 @@ static PyObject *pyxc_error_to_exception(xc_interface *xch)
|
||||
snprintf(err_buf.message, sizeof(err_buf.message),
|
||||
"xc_interface_open failed: %s",
|
||||
strerror(errno));
|
||||
err_buf.message[sizeof(err_buf)-1] = 0;
|
||||
err_buf.code = XC_INTERNAL_ERROR;
|
||||
err = &err_buf;
|
||||
}
|
||||
|
||||