From faa54a392951468090f0095ffa927b16fcb20ca4 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 19 Aug 2007 04:23:20 +0000 Subject: Code review of the new buffer protocol. Mostly add questions that should be answered with the comments removed. There are many places that require checks when doing arithmetic for memory sizes when allocating memory. Otherwise, overflow is possible with a subsequent crash. Fix SF #1777057 which was a result of not initializing the new BufferError properly. Had to update the test for exceptions for BufferError too. --- Include/bytesobject.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Include/bytesobject.h') diff --git a/Include/bytesobject.h b/Include/bytesobject.h index 12ecf64d0c..729af398f0 100644 --- a/Include/bytesobject.h +++ b/Include/bytesobject.h @@ -21,6 +21,7 @@ extern "C" { /* Object layout */ typedef struct { PyObject_VAR_HEAD + /* XXX(nnorwitz): should ob_exports be Py_ssize_t? */ int ob_exports; /* how many buffer exports */ Py_ssize_t ob_alloc; /* How many bytes allocated */ char *ob_bytes; -- cgit v1.2.1