summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfaultHye-Shik Chang2006-10-081-14/+22
| | | | when encoding non-BMP unicode characters. (Submitted by Ray Chason)
* Cause a PyObject_Malloc() failure to trigger a MemoryError, and thenAndrew M. Kuchling2006-10-041-2/+21
| | | | | | | add 'if (PyErr_Occurred())' checks to various places so that NULL is returned properly. 2.4 backport candidate.
* Forward-port of r52136,52138: a review of overflow-detecting code.Armin Rigo2006-10-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | | * 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. * 2.5 specific: fixed a number of places that were still confusing int and Py_ssize_t. Some of them could potentially have caused "real-world" breakage. * list.pop(x): fixing overflow issues on x was messy. I just reverted to PyArg_ParseTuple("n"), which does the right thing. (An obscure test was trying to give a Decimal to list.pop()... doesn't make sense any more IMHO) * trying to write a few tests...
* Compilation problem caused by conflicting typedefs for uint32_tArmin Rigo2006-10-042-0/+4
| | | | (unsigned long vs. unsigned int).
* Bug #1556784: allow format strings longer than 127 characters inGeorg Brandl2006-09-301-2/+2
| | | | datetime's strftime function.
* Remove extra semi-colons reported by Johnny Lee on python-dev. Backport if ↵Neal Norwitz2006-09-232-3/+3
| | | | anyone cares.
* * regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_tJack Diederich2006-09-211-1/+1
| | | | | | which breaks negative counts * added test for negative numbers will backport to 2.5.1
* Fixes a bug with bsddb.DB.stat where the flags and txn keywordGregory P. Smith2006-09-191-2/+2
| | | | | | arguments are transposed. (reported by Louis Zechtzer) ..already committed to release24-maint ..needs committing to release25-maint
* Patch #1557515: Add RLIMIT_SBSIZE.Martin v. Löwis2006-09-161-0/+4
|
* Rewrite help message to remove some of the parentheticals. (There were a ↵Andrew M. Kuchling2006-09-141-9/+9
| | | | lot of them.)
* Make --help mention that -v can be supplied multiple timesAndrew M. Kuchling2006-09-141-0/+1
|
* The cast function did not accept c_char_p or c_wchar_p instancesThomas Heller2006-09-071-2/+2
| | | | | as first argument, and failed with a 'bad argument to internal function' error message.
* Anonymous structure fields that have a bit-width specified did not work,Thomas Heller2006-09-071-2/+2
| | | | | | | and they gave a strange error message from PyArg_ParseTuple: function takes exactly 2 arguments (3 given). With tests.
* [Bug #1552726] Avoid repeatedly polling in interactive mode -- only put a ↵Andrew M. Kuchling2006-09-071-1/+7
| | | | | | | | | | | timeout on the select() if an input hook has been defined. Patch by Richard Boulton. This select() code is only executed with readline 2.1, or if READLINE_CALLBACKS is defined. Backport candidate for 2.5, 2.4, probably earlier versions too.
* Bug #1551427: fix a wrong NULL pointer check in the win32 versionGeorg Brandl2006-09-061-1/+1
| | | | of os.urandom().
* Fix a few bugs on cjkcodecs found by Oren Tirosh:Hye-Shik Chang2006-09-053-28/+39
| | | | | | | | - gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly. - iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312 codepoints to conform the standard. - iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 2013:2 codepoints now.
* Bug #1550714: fix SystemError from itertools.tee on negative value for n.Neal Norwitz2006-09-021-2/+6
| | | | Needs backport to 2.5.1 and earlier.
* Bug #1548092: fix curses.tparm seg fault on invalid input. Needs backport ↵Neal Norwitz2006-09-021-0/+4
| | | | to 2.5.1 and earlier.
* Add missing file for _ctypes.pyd port to win64 on AMD64.Thomas Heller2006-08-251-0/+156
|
* Port _ctypes.pyd to win64 on AMD64.Thomas Heller2006-08-258-42/+169
|
* Fix SF bug #1545837: array.array borks on deepcopy.Thomas Wouters2006-08-241-1/+1
| | | | | array.__deepcopy__() needs to take an argument, even if it doesn't actually use it. Will backport to 2.5 and 2.4 (if applicable.)
* Expose column offset information in parse trees.Jeremy Hylton2006-08-221-15/+30
|
* Alexander Belopolsky pointed out that pos is a size_tNeal Norwitz2006-08-221-1/+1
|
* Fix a couple of ssize-t issues reported by Alexander Belopolsky on python-devNeal Norwitz2006-08-211-1/+1
|
* Move assert to after NULL check, otherwise we deref NULL in the assert.Neal Norwitz2006-08-191-1/+1
| | | | Klocwork #307
* Add asserts to check for 'impossible' NULL values, with comments.Thomas Heller2006-08-181-0/+16
| | | | | | | | In one place where I'n not 1000% sure about the non-NULL, raise a RuntimeError for safety. This should fix the klocwork issues that Neal sent me. If so, it should be applied to the release25-maint branch also.
* SF#1534630Fredrik Lundh2006-08-161-1/+5
| | | | ignore data that arrives before the opening start tag
* Remove the special casing of Py_None when converting the return valueThomas Heller2006-08-161-1/+1
| | | | | | | | | | of the Python part of a callback function to C. If it cannot be converted, call PyErr_WriteUnraisable with the exception we got. Before, arbitrary data has been passed to the calling C code in this case. (I'm not really sure the NEWS entry is understandable, but I cannot find better words)
* The __repr__ method of a NULL py_object does no longer raise anThomas Heller2006-08-161-1/+1
| | | | | | | exception. Remove a stray '?' character from the exception text when the value is retrieved of such an object. Includes tests.
* Add commented assert statements to check that the result ofThomas Heller2006-08-161-20/+36
| | | | | | | | PyObject_stgdict() and PyType_stgdict() calls are non-NULL before dereferencing the result. Hopefully this fixes what klocwork is complaining about. Fix a few other nits as well.
* Check for NULL return value from new_CArgObject calls.Thomas Heller2006-08-151-0/+6
|
* Patch #1511317: don't crash on invalid hostname infoGeorg Brandl2006-08-141-11/+14
|
* Patch #1535500: fix segfault in BZ2File.writelines and make sure itGeorg Brandl2006-08-141-2/+17
| | | | raises the correct exceptions.
* Patch #1536908: Add support for AMD64 / OpenBSD.Thomas Heller2006-08-143-3/+2
| | | | | Remove the -no-stack-protector compiler flag for OpenBSD as it has been reported to be unneeded.
* Apply the patch #1532975 plus ideas from the patch #1533481.Thomas Heller2006-08-143-162/+182
| | | | | | | | | | | | | | ctypes instances no longer have the internal and undocumented '_as_parameter_' attribute which was used to adapt them to foreign function calls; this mechanism is replaced by a function pointer in the type's stgdict. In the 'from_param' class methods, try the _as_parameter_ attribute if other conversions are not possible. This makes the documented _as_parameter_ mechanism work as intended. Change the ctypes version number to 1.0.1.
* Revert the change that tries to zero out a closure's result storageThomas Heller2006-08-141-15/+5
| | | | area because the size if unknown in source/callproc.c.
* Check for NULL return value of GenericCData_new().Thomas Heller2006-08-141-0/+4
| | | | Fixes klockwork issues #188, #189.
* Check for NULL return value from new_CArgObject().Thomas Heller2006-08-141-0/+6
| | | | Fixes klockwork issues #183, #184, #185.
* Remove unused, buggy test function.Thomas Heller2006-08-141-12/+0
| | | | Fixes klockwork issue #207.
* Get rid of compiler warningNeal Norwitz2006-08-131-2/+2
|
* Handle alloca failures.Neal Norwitz2006-08-132-0/+15
| | | | Klocwork 225-228
* Really address the issue of where to place the assert for leftblock.Neal Norwitz2006-08-131-1/+1
| | | | (Followup of Klocwork 274)
* Handle failure from PyModule_GetDict() (Klocwork 208).Neal Norwitz2006-08-131-9/+15
| | | | | Fix a bunch of refleaks in the init of the module. This would only be found when running python -v.
* Handle failures from lookup.Neal Norwitz2006-08-131-0/+4
| | | | Klocwork 341-342
* It's very unlikely, though possible that source is not a string. VerifyNeal Norwitz2006-08-131-0/+3
| | | | | | | that PyString_AsString() returns a valid pointer. (The problem can arise when zlib.decompress doesn't return a string.) Klocwork 346
* Handle malloc and fopen failures more gracefully.Neal Norwitz2006-08-131-2/+8
| | | | Klocwork 180-181
* Check return result of PyModule_GetDict().Neal Norwitz2006-08-131-22/+24
| | | | | Fix a bunch of refleaks in the init of the module. This would only be found when running python -v.
* Patch #1538606, Patch to fix __index__() clipping.Neal Norwitz2006-08-123-40/+14
| | | | | | | I modified this patch some by fixing style, some error checking, and adding XXX comments. This patch requires review and some changes are to be expected. I'm checking in now to get the greatest possible review and establish a baseline for moving forward. I don't want this to hold up release if possible.
* Verify verdat which is returned from malloc is not NULL.Neal Norwitz2006-08-121-4/+13
| | | | | | Ensure we don't pass NULL to free. Klocwork #306 (at least the first part, checking malloc)
* Don't deref v if it's NULL.Neal Norwitz2006-08-121-2/+4
| | | | Klocwork #214