3484 Commits

Author SHA1 Message Date
Martin v. Löwis
9b8de84a89 Backported r55839 and r61350
Issue #4469: Prevent expandtabs() on string and unicode
objects from causing a segfault when a large width is passed
on 32-bit platforms.
2008-12-13 13:20:46 +00:00
Amaury Forgeot d'Arc
a5f3ceb21e #4317: Fix an Array Bounds Read in imageop.rgb2rgb8.
Backport of r67266
2008-11-18 22:49:39 +00:00
Benjamin Peterson
38ce9c294b backport the security fix part of r67246 2008-11-17 23:27:02 +00:00
Matthias Klose
3a87f93c42 - Security Issue #2: imageop did not validate arguments correctly and could
segfault as a result. CVE-2008-4864.

backport r66689
2008-11-12 07:29:23 +00:00
Martin v. Löwis
0cc3ea620c Revert the following revisions, as they don't fix security
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
2008-03-02 17:47:51 +00:00
Hye-Shik Chang
ac90ca8c54 Fix for Windows: close a temporary file before trying to delete it. 2007-06-05 19:28:15 +00:00
Hye-Shik Chang
bc7902fb89 (Backport from r55770)
Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it
reads a file that ends with incomplete sequence and sizehint argument
for .read() is specified.
2007-06-05 19:02:59 +00:00
Thomas Wouters
0c0d949feb Backported r51621 from p3yk:
Don't use a fixed temporary name (gdbm).
Don't use our own temp name creation (dbm).
2007-02-25 22:15:53 +00:00
Andrew M. Kuchling
0866c8ba6f Add extra SHA tests 2006-11-20 13:31:28 +00:00
Tim Peters
2b37ea4087 Backport of the pieces of trunk rev 46589 relevant to
fixing an unlikely crash bug in dict resizing, SF
bug 1456209.

The rest of rev 46589 changes whether Python suppresses
exceptions during some dict-related comparisons.  While I
think that's a good idea, it does change visible behavior at
times, and there was already some complaining about that on
the trunk.  Not a good idea for backporting.  The part of
46589 checked in here can at worst stop segfaults, and I doubt
anyone will gripe about that ;-)
2006-10-09 20:24:45 +00:00
Martin v. Löwis
b8f82e6feb Backport r45505, r45573, r45576
- reset errno before calling confstr - use confstr() doc to simplify
  checks afterwards
- Correct implementation and documentation of os.confstr.  Add a simple
  test case.  I've yet to figure out how to provoke a None return I can test.
- Address issues brought up by MvL on python-checkins.
  I tested this with valgrind on amd64.

  The man pages I found for diff architectures are inconsistent on this.
  I'm not entirely sure this change is correct for all architectures
  either.

  Perhaps we should just over-allocate and not worry about it?

The change to return None instead of "" in case of unconfigured
values has not been backported.
2006-10-09 19:29:06 +00:00
Ronald Oussoren
392cafba4f Port of universal binary support for Mac OSX from python 2.5. This takes away
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.
2006-10-08 17:41:25 +00:00
Hye-Shik Chang
2d09be9e48 Backport from trunk r52223:
Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters.  (Submitted by Ray Chason)
2006-10-08 13:56:00 +00:00
Andrew M. Kuchling
1af9f68b4a [Backport r51248 | neal.norwitz]
Fix segfault when doing string formatting on subclasses of long if
__oct__, __hex__ don't return a string.

Klocwork 308
2006-10-05 17:18:13 +00:00
Armin Rigo
b2d0f34240 A review of overflow-detecting code in the 2.4 branch.
* 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.
2006-10-04 10:13:32 +00:00
Martin v. Löwis
98041d7bf0 Fix integer negation and absolute value to not rely
on undefined behaviour of the C compiler anymore.
2006-10-04 05:48:05 +00:00
Andrew M. Kuchling
9569ea3425 [Backport rev. 51728 by neal.norwitz]
Patch #1540470, for OpenBSD 4.0.  Backport candidate for 2.[34].
2006-10-03 13:08:57 +00:00
Georg Brandl
16e469b249 Bug #1556784: allow format strings longer than 127 characters in
datetime's strftime function.
 (backport from rev. 52072)
2006-09-30 11:17:39 +00:00
Georg Brandl
ee2940d5d2 Bug #1560617: in pyclbr, return full module name not only for classes,
but also for functions.
 (backport from rev. 52069)
2006-09-30 11:06:51 +00:00
Georg Brandl
adf8a1d0cb Patch #1567691: super() and new.instancemethod() now don't accept
keyword arguments any more (previously they accepted them, but didn't
use them).
 (backport from rev. 52058)
2006-09-30 08:43:35 +00:00
Andrew M. Kuchling
c138772a20 [Backport rev. 46882 by neal.norwitz]
Fix the socket tests so they can be run concurrently.  Backport candidate
2006-09-29 18:30:59 +00:00
Neal Norwitz
27d7e8dc64 Backport 51850 from release25-maint branch.
As mentioned on python-dev, reverting patch #1504333 because it introduced
an infinite loop in rev 47154.

This patch also adds a test to prevent the regression.
2006-09-11 04:18:06 +00:00
Hye-Shik Chang
56b5458f43 Backport from trunk r51737:
Fixed a few bugs on cjkcodecs:
- 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 0213:2
 codepoints now.
2006-09-07 13:06:10 +00:00
Thomas Wouters
ba8522ad28 Backport trunk's revision 51565:
Fix SF bug #1545837: array.array borks on deepcopy.
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.)
2006-08-24 18:55:01 +00:00
Georg Brandl
79ba8e53aa Backport rev 51448:
- Patch #1541585: fix buffer overrun when performing repr() on
  a unicode string in a build with wide unicode (UCS-4) support.
2006-08-22 08:25:33 +00:00