Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.3
python
python-2.7.3-fix-dbm-64bit-bigendian.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python-2.7.3-fix-dbm-64bit-bigendian.patch of Package python
Index: Python-2.7.3/Modules/dbmmodule.c =================================================================== --- Python-2.7.3.orig/Modules/dbmmodule.c +++ Python-2.7.3/Modules/dbmmodule.c @@ -168,12 +168,18 @@ static int dbm_contains(register dbmobject *dp, PyObject *v) { datum key, val; + Py_ssize_t dsize; - if (PyString_AsStringAndSize(v, (char **)&key.dptr, - (Py_ssize_t *)&key.dsize)) { + if (PyString_AsStringAndSize(v, (char **)&key.dptr, &dsize)) { return -1; } + /* Coerce from Py_ssize_t down to int: */ + if (dsize > INT_MAX) { + return -1; + } + key.dsize = dsize; + /* Expand check_dbmobject_open to return -1 */ if (dp->di_dbm == NULL) { PyErr_SetString(DbmError, "DBM object has already been closed");
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor