[issue21349] crash in winreg SetValueEx with memoryview

Brian Kearns report at bugs.python.org
Sat Apr 26 04:24:10 CEST 2014


Brian Kearns added the comment:

Are you aware of the old/new buffer interfaces and their usages? Did you actually try the code? "crash" would be obvious.

Objects that support only the new buffer interface define tp_as_buffer with fields representing the old buffer interface as null.

So, everywhere that uses the old buffer interface usually checks both tp_as_buffer != NULL and tp_as_buffer->bf_getreadbuffer != NULL. That second check is missing here before calling bf_getreadbuffer.

----------

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


More information about the Python-bugs-list mailing list