Message73640
Sample code:
PyObject *b=PyBytes_FromString("eh ?????");
PyObject *mv=PyMemoryView_FromObject(b);
PyObject_CheckReadBuffer(mv);
From following the chain of calls in PyObject_CheckReadBuffer,
a few things are unclear.
It calls bf_getbuffer with a NULL Py_Buffer pointer, although the PEP
explicitely states that is should never be NULL.
PyBuffer_FillInfo immediately returns success if the view pointer is
NULL. I'm guessing this is to just determine if the operation could be
completed, but it returns before any checks are done.
It then attempts to release a hardcoded NULL Py_buffer pointer
which of course crashes. |
|
Date |
User |
Action |
Args |
2008-09-23 13:55:58 | rupole | set | recipients:
+ rupole |
2008-09-23 13:55:58 | rupole | set | messageid: <1222178158.76.0.378001331035.issue3946@psf.upfronthosting.co.za> |
2008-09-23 13:54:49 | rupole | link | issue3946 messages |
2008-09-23 13:54:48 | rupole | create | |
|