summaryrefslogtreecommitdiff
path: root/Objects/moduleobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-02-04 22:57:44 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-02-04 22:57:44 +0200
commit44a28ecbe2c09fe5ec4959c254fdfe5b6a9fe322 (patch)
tree007442e524d9584fe16f0d80ad2b8933809f3b1b /Objects/moduleobject.c
parent2296b978597ce62ec2185b78a43811610af2c0ea (diff)
parentefe8c92c7a269af2f9ded960735e74d62d791330 (diff)
downloadcpython-44a28ecbe2c09fe5ec4959c254fdfe5b6a9fe322.tar.gz
Issue #29444: Fixed out-of-bounds buffer access in the group() method of
the match object. Based on patch by WGH.
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r--Objects/moduleobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index 79be51a806..350f3bfe3a 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -188,7 +188,7 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
(if the name actually matches).
*/
if (_Py_PackageContext != NULL) {
- char *p = strrchr(_Py_PackageContext, '.');
+ const char *p = strrchr(_Py_PackageContext, '.');
if (p != NULL && strcmp(module->m_name, p+1) == 0) {
name = _Py_PackageContext;
_Py_PackageContext = NULL;
@@ -231,7 +231,7 @@ PyModule_FromDefAndSpec2(struct PyModuleDef* def, PyObject *spec, int module_api
PyObject *nameobj;
PyObject *m = NULL;
int has_execution_slots = 0;
- char *name;
+ const char *name;
int ret;
PyModuleDef_Init(def);
@@ -512,7 +512,7 @@ const char *
PyModule_GetFilename(PyObject *m)
{
PyObject *fileobj;
- char *utf8;
+ const char *utf8;
fileobj = PyModule_GetFilenameObject(m);
if (fileobj == NULL)
return NULL;