summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for 2.4.5c1v2.4.5c1Martin v. Löwis2008-03-021-1/+1
|
* Backport of r60793:Martin v. Löwis2008-03-021-4/+56
| | | | | | Added checks for integer overflows, contributed by Google. Some are only available if asserts are left in the code, in cases where they can't be triggered from Python code.
* Revert the following revisions, as they don't fix securityMartin v. Löwis2008-03-021-5/+3
| | | | | | | problems: 52448, 52468, 52472, 52475, 52646, 52797, 52802, 52863, 52999, 53001, 53101, 53371, 53373, 53383, 53384, 53736, 53812, 53921, 55578, 55580, 55581, 55772, 55775, 56557, 57093, 57094, 58630, 60114
* Backport trunk revision 53527:Thomas Wouters2007-01-232-4/+6
| | | | | | | | | | | | | SF patch #1630975: Fix crash when replacing sys.stdout in sitecustomize When running the interpreter in an environment that would cause it to set stdout/stderr/stdin's encoding, having a sitecustomize that would replace them with something other than PyFile objects would crash the interpreter. Fix it by simply ignoring the encoding-setting for non-files. This could do with a test, but I can think of no maintainable and portable way to test this bug, short of adding a sitecustomize.py to the buildsystem and have it always run with it (hmmm....)
* Backport of r52862.Armin Rigo2006-11-291-1/+3
|
* [Bug #1542016] Report PCALL_POP value. This makes the return value of ↵Andrew M. Kuchling2006-10-271-2/+2
| | | | sys.callstats() match its docstring.
* Port of universal binary support for Mac OSX from python 2.5. This takes awayRonald Oussoren2006-10-081-5/+8
| | | | | | | | the need for the out-of-tree universal binary support that was used to build the 2.4.3 installer. Missing here relative to that tree are some changes to IDLE, IMHO those patches aren't appropriate for the 2.4 branch and users are better of using 2.5's IDLE.
* [Backport r46044 | neal.norwitz]Andrew M. Kuchling2006-10-061-0/+4
| | | | | Fix #132 from Coverity, retval could have been derefed if a continue inside a try failed.
* [Backport r51221 | neal.norwitz -- the original commit message is wrong;Andrew M. Kuchling2006-10-051-0/+8
| | | | | | | | | | | | this code is only used if WITHOUT_COMPLEX is *not* defined, which is the common case for Python builds.] This code is actually not used unless WITHOUT_COMPLEX is defined. However, there was no error checking that PyFloat_FromDouble returned a valid pointer. I believe this change is correct as it seemed to follow other code in the area. Klocwork # 292.
* [Backport r51220 | neal.norwitz]Andrew M. Kuchling2006-10-051-2/+2
| | | | | | | It's highly unlikely, though possible for PyEval_Get*() to return NULLs. So be safe and do an XINCREF. Klocwork # 221-222.
* [Backport r50685 | neal.norwitz]Andrew M. Kuchling2006-10-051-2/+13
| | | | | | | | Reported by Klocwork #151. v2 can be NULL if exception2 is NULL. I don't think that condition can happen, but I'm not sure it can't either. Now the code will protect against either being NULL.
* [Backport r50743 | neal.norwitz]Andrew M. Kuchling2006-10-053-41/+45
| | | | | Handle allocation failures gracefully. Found with failmalloc. Many (all?) of these could be backported.
* [Backport r51247 | neal.norwitz]Andrew M. Kuchling2006-10-051-1/+6
| | | | | | | | | cpathname could be NULL if it was longer than MAXPATHLEN. Don't try to write the .pyc to NULL. Check results of PyList_GetItem() and PyModule_GetDict() are not NULL. Klocwork 282, 283, 285
* [Backport r51245 | neal.norwitz]Andrew M. Kuchling2006-10-041-1/+7
| | | | | | | Move/copy assert for tstate != NULL before first use. Verify that PyEval_Get{Globals,Locals} returned valid pointers. Klocwork 231-232
* A review of overflow-detecting code in the 2.4 branch.Armin Rigo2006-10-042-25/+49
| | | | | | | | | | | | * unified the way intobject, longobject and mystrtoul handle values around -sys.maxint-1. * in general, trying to entierely avoid overflows in any computation involving signed ints or longs is extremely involved. Fixed a few simple cases where a compiler might be too clever (but that's all guesswork). * more overflow checks against bad data in marshal.c.
* [Partial backport of r50777 | neal.norwitz]Andrew M. Kuchling2006-10-031-1/+3
| | | | | | | Handle more mem alloc issues found with failmalloc [The other half of this patch affected Python/symtable.c, and wasn't relevant for the 2.4 branch. --amk]
* [Backport r51443 | neal.norwitz]Andrew M. Kuchling2006-10-031-0/+5
| | | | | | Handle a few more error conditions. Klocwork 301 and 302. Will backport.
* [Backport r51231 | neal.norwitz]Andrew M. Kuchling2006-10-031-0/+4
| | | | | | PyModule_GetDict() can fail, produce fatal errors if this happens on startup. Klocwork #298-299.
* [Backport r50678 | neal.norwitz]Andrew M. Kuchling2006-10-031-7/+9
| | | | | | Fix memory leak under some conditions. Reported by Klocwork, #98.
* [Backport rev. 41696 by neal.norwitz]Andrew M. Kuchling2006-09-291-1/+2
| | | | | | | | | Fix an int/long mismatch identified here: http://www.tortall.net/mu/blog/2005/12/01 Pointed out from SF #1365916. Backport candidate.
* [Backport of rev. 42093 by neal.norwitz]Andrew M. Kuchling2006-09-273-0/+6
| | | | | | Check return result from Py_InitModule*(). This API can fail. Probably should be backported.
* Backport fixes for #1523610 (crashes in PyArg_ParseTuple):Georg Brandl2006-08-091-2/+13
| | | | rev. 51158 and rev. 50843.
* Bug #1535165: fixed a segfault in input() and raw_input() whenGeorg Brandl2006-08-061-1/+1
| | | | | sys.stdin is closed. (backport from rev. 51129)
* Complete backport of rev 50787 that was started in rev 50788Andrew MacIntyre2006-07-231-1/+1
|
* bugfix: PyThread_start_new_thread() returns the thread ID, not a flag;Andrew MacIntyre2006-07-231-6/+3
| | | | backport of rev 50787.
* Argh. "integer" is a very confusing word ;)Georg Brandl2006-06-081-2/+2
| | | | | | Actually, checking for INT_MAX and INT_MIN is correct since the format code explicitly handles a C "int". (backport from rev. 46746)
* Bug #1502750: Fix getargs "i" format to use LONG_MIN and LONG_MAX for bounds ↵Georg Brandl2006-06-081-2/+2
| | | | | | checking. (backport from rev. 46741)
* Fix possible buffer overflow on Windows when reading code page.Brett Cannon2006-06-051-1/+1
| | | | Backport of fix for bug #1501223.
* Backport trunk's r45715:Thomas Wouters2006-04-251-0/+4
| | | | | | | | | | Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python uses MAXPATHLEN-sized buffers for various output-buffers (like to realpath()), and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and does not define MAXPATHLEN.) Cursory googling suggests Linux is following a newer standard than BSD, but in cases like this, who knows. Using the greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the most portable solution.
* Ignore the references to the dummy objects used as deleted keysArmin Rigo2006-04-122-5/+4
| | | | in dicts and sets when computing the total number of references.
* Backport of compile.c part of r41531 (neal.norwitz, 2005-11-24):Martin v. Löwis2006-03-271-3/+3
| | | | Fix a ref leak.
* update - still some old .cvsignore files lying aroundAnthony Baxter2006-03-231-2/+0
|
* Change SystemError into SyntaxError, when a Unicode stringMartin v. Löwis2006-03-221-1/+7
| | | | | containing an encoding declaration is compile()d. Fixes #1115379.
* Backport r42894: SF #1444030 Fix several potential defects foundHye-Shik Chang2006-03-072-2/+9
| | | | by Coverity.
* Backport of memory leak fixes.Martin v. Löwis2006-03-011-1/+5
|
* Return value off PyErr_Warn() for raising string exceptions was not beingBrett Cannon2006-02-271-3/+5
| | | | | checked. Problem when 'warnings' was set to "error" and thus would re-raise a new exception.
* do_mkvalue(): Squash compiler warnings about mixingTim Peters2006-02-271-2/+2
| | | | signed and unsigned types in comparison.
* Merge rev 42607 from the trunk.Tim Peters2006-02-271-0/+4
| | | | | | | | | Patch 1413181, by Gabriel Becedillas. PyThreadState_Delete(): if the auto-GIL-state machinery knows about the thread state, forget it (since the thread state is being deleted, continuing to remember it can't help, but can hurt if another thread happens to get created with the same thread id).
* Bug #801349: document that start/stop/step slice arguments can be NoneGeorg Brandl2006-02-191-1/+1
|
* Cast assignments to ``unsigned char *`` from PyString_AS_STRING() calls toBrett Cannon2006-02-162-2/+2
| | | | silence compiler warnings on gcc 4.0.1 .
* Update general copyright year to 2006.Georg Brandl2006-02-111-1/+1
|
* bug #1281408: make Py_BuildValue work with unsigned longs and long longsGeorg Brandl2005-11-241-3/+20
|
* Backport one of the ref/memory leaksNeal Norwitz2005-11-211-0/+1
|
* Backport:Neal Norwitz2005-11-091-1/+4
| | | | | | SF Bug #1350188, "setdlopenflags" leads to crash upon "import" It was possible dlerror() returns a NULL pointer, use a default error message in this case.
* Backport: SF bug #1167751: fix incorrect code being for generator expressions.Neal Norwitz2005-10-231-7/+15
|
* Backport:Neal Norwitz2005-10-031-1/+5
| | | | Fix SF bug #976608, Unhelpful error message when mtime of a module is -1
* Backport:Neal Norwitz2005-10-031-0/+9
| | | | | | SF bug #887946, segfault if redirecting directory Also provide a warning if a directory is passed on the command line. Add minimal command line test.
* Backported:Neal Norwitz2005-10-021-1/+1
| | | | | Fix segfault with invalid coding. (See SF bug: 772896 for another fix)
* Fix bug:Michael W. Hudson2005-09-301-0/+4
| | | | | | | | [ 1307978 ] Unsatisfied symbols: _PyGILState_NoteThreadState (code) (note that this only happens in a threads-disabled build). Will forward port momentarily.
* Backport bugfix:Michael W. Hudson2005-09-231-15/+53
| | | | | | | | | | Fix bug: [ 1163563 ] Sub threads execute in restricted mode basically by fixing bug 1010677 in a non-broken way. Backport candidate.