Staging
v0.5.1
https://github.com/python/cpython
Revision b5afbd027bffbaa998c0ea149fdeea75a6a41c2e authored by Guido van Rossum on 30 November 2003, 22:07:34 UTC, committed by Guido van Rossum on 30 November 2003, 22:07:34 UTC
Remove all uses of alloca() from this module.  The alloca() return value
isn't checked, and it *is* possible that a very large alloca() call is
made, e.g. when a large registry value is being read.  I don't know if
alloca() in that case returns NULL or returns a pointer pointing outside
the stack, and I don't want to know -- I've simply replaced all calls to
alloca() with either PyMem_Malloc() or PyString_FromStringAndSize(NULL,)
as appropriate, followed by a size check.  This addresses SF buf 851056.
1 parent dfea1bb
History
Tip revision: b5afbd027bffbaa998c0ea149fdeea75a6a41c2e authored by Guido van Rossum on 30 November 2003, 22:07:34 UTC
Backport:
Tip revision: b5afbd0

README

back to top