[Zope-Checkins] CVS: Packages/AccessControl -
cAccessControl.c:1.20.2.16
Tim Peters
tim.one at comcast.net
Tue Dec 14 11:01:07 EST 2004
Update of /cvs-repository/Packages/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv10892/lib/python/AccessControl
Modified Files:
Tag: Zope-2_7-branch
cAccessControl.c
Log Message:
SecurityManager_setattro(): Failure to convert the name to string must
be explicitly dealt with. Unclear what to do then. This passes the
exception on to the caller.
=== Packages/AccessControl/cAccessControl.c 1.20.2.15 => 1.20.2.16 ===
--- Packages/AccessControl/cAccessControl.c:1.20.2.15 Tue Dec 14 10:56:23 2004
+++ Packages/AccessControl/cAccessControl.c Tue Dec 14 11:01:07 2004
@@ -1468,7 +1468,10 @@
if (PyString_Check(name) || PyUnicode_Check(name)) {
char *name_s = PyString_AsString(name);
- if (name_s && name_s[0] == '_')
+ if (name_s == NULL)
+ return -1;
+
+ if (name_s[0] == '_')
{
if (! strcmp(name_s, "_thread_id"))
{
More information about the Zope-Checkins
mailing list