diff options
author | Eli Bendersky <eliben@gmail.com> | 2013-05-25 05:27:10 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2013-05-25 05:27:10 -0700 |
commit | 43571906e334ddae42f9cbda3c1e6a3f8dd864be (patch) | |
tree | 99b8a08094c89c2bc18ae8d6b10b13dc14a0cac2 /Include/import.h | |
parent | e48b606a8a24941cdf36eddc42f49bc83d277728 (diff) | |
parent | 0ee619afec42bdc371fd3c54d8ab7f4f90193b0f (diff) | |
download | cpython-43571906e334ddae42f9cbda3c1e6a3f8dd864be.tar.gz |
Issue #13612: handle unknown encodings without a buffer overflow.
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.
Based on a patch by Serhiy Storchaka.
Diffstat (limited to 'Include/import.h')
-rw-r--r-- | Include/import.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Include/import.h b/Include/import.h index fdc27336c3..90049e051b 100644 --- a/Include/import.h +++ b/Include/import.h @@ -113,15 +113,15 @@ PyAPI_FUNC(int) PyImport_AppendInittab( #ifndef Py_LIMITED_API struct _frozen { - char *name; /* ASCII encoded string */ - unsigned char *code; + const char *name; /* ASCII encoded string */ + const unsigned char *code; int size; }; /* Embedding apps may change this pointer to point to their favorite collection of frozen modules: */ -PyAPI_DATA(struct _frozen *) PyImport_FrozenModules; +PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules; #endif #ifdef __cplusplus |