mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Fix for SF# 1649098: avoid zero-sized array declaration in structure.
This commit is contained in:
parent
fa704c6ade
commit
ef4fff3435
3 changed files with 5 additions and 2 deletions
|
|
@ -708,6 +708,9 @@ Library
|
|||
Extension Modules
|
||||
-----------------
|
||||
|
||||
- Bug #1649098: Avoid declaration of zero-sized array declaration in
|
||||
structure.
|
||||
|
||||
- Removed the rgbimg module; been deprecated since Python 2.5.
|
||||
|
||||
- Bug #1721309: prevent bsddb module from freeing random memory.
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ ffi_info *AllocFunctionCallback(PyObject *callable,
|
|||
ffi_abi cc;
|
||||
|
||||
nArgs = PySequence_Size(converters);
|
||||
p = (ffi_info *)PyMem_Malloc(sizeof(ffi_info) + sizeof(ffi_type) * (nArgs + 1));
|
||||
p = (ffi_info *)PyMem_Malloc(sizeof(ffi_info) + sizeof(ffi_type) * (nArgs));
|
||||
if (p == NULL) {
|
||||
PyErr_NoMemory();
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ typedef struct {
|
|||
PyObject *callable;
|
||||
SETFUNC setfunc;
|
||||
ffi_type *restype;
|
||||
ffi_type *atypes[0];
|
||||
ffi_type *atypes[1];
|
||||
} ffi_info;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue