libxc: drop size parameter from xc_flask_context_to_sid()

Nul-terminated strings are passed in all cases, so the strlen() can very
well be invoked by the function itself. In preparation for a hypervisor
change also include the nul terminator in the size calculation.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
This commit is contained in:
Jan Beulich committed 2026-07-06 09:41:45 +02:00
1 parent e457520245
commit dc21138144
5 files changed
+12 -8

No files matched your search

+1 -1
View File
@@ -1754,7 +1754,7 @@ static PyObject *pyflask_context_to_sid(PyObject *self, PyObject *args,
return PyErr_SetFromErrno(xc_error_obj);
}
ret = xc_flask_context_to_sid(xc_handle, ctx, strlen(ctx), &sid);
ret = xc_flask_context_to_sid(xc_handle, ctx, &sid);
xc_interface_close(xc_handle);
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.