Serhiy Storchaka added the comment:
May be apply the fix to 3.3?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23446
___
___
Python-bugs-list
Benjamin Peterson added the comment:
That would be nice.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23446
___
___
Python-bugs-list mailing
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
versions: +Python 2.7, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23446
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23446
___
Roundup Robot added the comment:
New changeset d83884b3a427 by Serhiy Storchaka in branch '2.7':
Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer
https://hg.python.org/cpython/rev/d83884b3a427
New changeset 036a2aceae93 by Serhiy Storchaka in branch '3.4':
Issue
Serhiy Storchaka added the comment:
In _testbuffer.c: ndim = 64, so the changes aren't really necessary.
Indeed, I'll remove these changes.
The reason is of course that even an array with only 2 elements per
dimension gets quite large with ndim=64. :)
But an array can be with 1 element per
Stefan Krah added the comment:
Yes, but these (degenerate) arrays tend to arise only as a result of slicing.
Last time I looked NumPy had MAX_NDIM=32, so we should be fine.
--
___
Python tracker rep...@bugs.python.org
New submission from Serhiy Storchaka:
Proposed patch replaces PyMem_Malloc with PyMem_New if the former is used in
the form PyMem_Malloc(len * sizeof(type)). This can fix possible overflow
errors and makes the code cleaner.
--
components: Extension Modules, Interpreter Core
files:
Stefan Krah added the comment:
In _testbuffer.c: ndim = 64, so the changes aren't really necessary.
Somehow this fact needs to get widely known, since it does not make
sense to check for overflow anytime ndim is used.
The reason is of course that even an array with only 2 elements per
Benjamin Peterson added the comment:
Very nice. I think you should also apply it to older versions, since (as we
now) this sort of thing is very liable to cause security problems.
--
___
Python tracker rep...@bugs.python.org
10 matches
Mail list logo