[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix xspy_get_permissions -- you can't increment the perms pointer when
# HG changeset patch # User emellor@xxxxxxxxxxxxxxxxxxxxxx # Node ID 4c14bca8ca93d9734bb888f26d2ac576e59c5b5a # Parent 606db2959bd6dc7fc178e9792f0ef345e48dd35e Fix xspy_get_permissions -- you can't increment the perms pointer when iterating and expect to be able to free that pointer afterwards. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> --- tools/python/xen/lowlevel/xs/xs.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff -r 606db2959bd6 -r 4c14bca8ca93 tools/python/xen/lowlevel/xs/xs.c --- a/tools/python/xen/lowlevel/xs/xs.c Tue May 23 12:05:08 2006 +0100 +++ b/tools/python/xen/lowlevel/xs/xs.c Tue May 23 16:14:03 2006 +0100 @@ -272,11 +272,12 @@ static PyObject *xspy_get_permissions(Xs if (perms) { PyObject *val = PyList_New(perms_n); - for (i = 0; i < perms_n; i++, perms++) { - PyObject *p = Py_BuildValue("{s:i,s:i,s:i}", - "dom", perms->id, - "read", perms->perms & XS_PERM_READ, - "write",perms->perms & XS_PERM_WRITE); + for (i = 0; i < perms_n; i++) { + PyObject *p = + Py_BuildValue("{s:i,s:i,s:i}", + "dom", perms[i].id, + "read", perms[i].perms & XS_PERM_READ, + "write", perms[i].perms & XS_PERM_WRITE); PyList_SetItem(val, i, p); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |