diff options
author | Fred Drake <fdrake@acm.org> | 2000-06-28 17:49:30 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-06-28 17:49:30 (GMT) |
commit | 541dc3b7b2606906e0ee2d9088a984443b1fa64c (patch) | |
tree | 5617b98464b3e3190cb34e5652fe265e4c3365f5 /Lib/test | |
parent | c82634c13cce7d846236eba8ab345c52cebc3567 (diff) | |
download | cpython-541dc3b7b2606906e0ee2d9088a984443b1fa64c.zip cpython-541dc3b7b2606906e0ee2d9088a984443b1fa64c.tar.gz cpython-541dc3b7b2606906e0ee2d9088a984443b1fa64c.tar.bz2 |
Trent Mick <trentm@activestate.com>:
The cause: Relatively recent (last month) patches to getargs.c added
overflow checking to the PyArg_Parse*() integral formatters thereby
restricting 'b' to unsigned char value and 'h','i', and 'l' to signed
integral values (i.e. if the incoming value is outside of the
specified bounds you get an OverflowError, previous it silently
overflowed).
The problem: This broke the array module (as Fredrik pointed out)
because *its* formatters relied on the loose allowance of signed and
unsigned ranges being able to pass through PyArg_Parse*()'s
formatters.
The fix: This patch fixes the array module to work with the more
strict bounds checking now in PyArg_Parse*().
How: If the type signature of a formatter in the arraymodule exactly
matches one in PyArg_Parse*(), then use that directly. If there is no
equivalent type signature in PyArg_Parse*() (e.g. there is no unsigned
int formatter in PyArg_Parse*()), then use the next one up and do some
extra bounds checking in the array module.
This partially closes SourceForge patch #100506.
Diffstat (limited to 'Lib/test')
0 files changed, 0 insertions, 0 deletions