diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-19 04:23:20 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-19 04:23:20 (GMT) |
commit | faa54a392951468090f0095ffa927b16fcb20ca4 (patch) | |
tree | a8586a5cc833217e6b1eaf4d052313475534178a /Objects/exceptions.c | |
parent | 1836358c016cd7f5117f4f34fa3a27c5701e8265 (diff) | |
download | cpython-faa54a392951468090f0095ffa927b16fcb20ca4.zip cpython-faa54a392951468090f0095ffa927b16fcb20ca4.tar.gz cpython-faa54a392951468090f0095ffa927b16fcb20ca4.tar.bz2 |
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.
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r-- | Objects/exceptions.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 710495f..7afaac0 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -1694,6 +1694,7 @@ _PyExc_Init(void) PRE_INIT(ZeroDivisionError) PRE_INIT(SystemError) PRE_INIT(ReferenceError) + PRE_INIT(BufferError) PRE_INIT(MemoryError) PRE_INIT(Warning) PRE_INIT(UserWarning) @@ -1753,6 +1754,7 @@ _PyExc_Init(void) POST_INIT(ZeroDivisionError) POST_INIT(SystemError) POST_INIT(ReferenceError) + POST_INIT(BufferError) POST_INIT(MemoryError) POST_INIT(Warning) POST_INIT(UserWarning) |