[issue20142] Argument Clinic: Py_buffer parameters are not initialized

Serhiy Storchaka report at bugs.python.org
Mon Jan 6 15:05:53 CET 2014


New submission from Serhiy Storchaka:

Argument Clinic doesn't initialize Py_buffer parameters. It generates cleanup code:

    /* Cleanup for data */
    if (data.buf)
       PyBuffer_Release(&data);

And if PyArg_ParseTuple() is failed, the buf attribute can contains arbitrary (non-NULL) data. This causes crash in PyBuffer_Release(). See issue20133 for working example.

----------
components: Build
files: spammodule.c
messages: 207433
nosy: larry, serhiy.storchaka
priority: release blocker
severity: normal
status: open
title: Argument Clinic: Py_buffer parameters are not initialized
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file33326/spammodule.c

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20142>
_______________________________________


More information about the Python-bugs-list mailing list