]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
17 years ago- Mention CVE-2008-5031 in issue #4469.
Matthias Klose [Tue, 16 Dec 2008 13:12:32 +0000 (13:12 +0000)] 
- Mention CVE-2008-5031 in issue #4469.

17 years agoAdd 2.4.6 final section.
Martin v. Löwis [Sat, 13 Dec 2008 22:31:31 +0000 (22:31 +0000)] 
Add 2.4.6 final section.

17 years agoTagging for release of Python 2.4.6c1
Martin v. Löwis [Sat, 13 Dec 2008 13:37:28 +0000 (13:37 +0000)] 
Tagging for release of Python 2.4.6c1

17 years agoAdd 2.4.6 uuids. v2.4.6c1
Martin v. Löwis [Sat, 13 Dec 2008 13:37:04 +0000 (13:37 +0000)] 
Add 2.4.6 uuids.

17 years agoPrepare for 2.4.6c1.
Martin v. Löwis [Sat, 13 Dec 2008 13:34:10 +0000 (13:34 +0000)] 
Prepare for 2.4.6c1.

17 years agoBackported r55839 and r61350
Martin v. Löwis [Sat, 13 Dec 2008 13:20:46 +0000 (13:20 +0000)] 
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.

17 years ago- Tools/faqwiz/move-faqwiz.sh: Fix unsecure use of temporary files.
Matthias Klose [Sun, 30 Nov 2008 13:33:28 +0000 (13:33 +0000)] 
- Tools/faqwiz/move-faqwiz.sh: Fix unsecure use of temporary files.

17 years ago#4317: Fix an Array Bounds Read in imageop.rgb2rgb8.
Amaury Forgeot d'Arc [Tue, 18 Nov 2008 22:49:39 +0000 (22:49 +0000)] 
#4317: Fix an Array Bounds Read in imageop.rgb2rgb8.

Backport of r67266

17 years agoupdate svn:ignore here
Benjamin Peterson [Mon, 17 Nov 2008 23:37:34 +0000 (23:37 +0000)] 
update svn:ignore here

17 years agobackport the security fix part of r67246
Benjamin Peterson [Mon, 17 Nov 2008 23:27:02 +0000 (23:27 +0000)] 
backport the security fix part of r67246

17 years ago- Security Issue #2: imageop did not validate arguments correctly and could
Matthias Klose [Wed, 12 Nov 2008 07:29:23 +0000 (07:29 +0000)] 
- Security Issue #2: imageop did not validate arguments correctly and could
  segfault as a result. CVE-2008-4864.

backport r66689

17 years ago- Issue #2587: In the C API, PyString_FromStringAndSize() takes a signed size
Matthias Klose [Wed, 12 Nov 2008 07:21:52 +0000 (07:21 +0000)] 
- Issue #2587: In the C API, PyString_FromStringAndSize() takes a signed size
  parameter but was not verifying that it was greater than zero.  Values
  less than zero will now raise a SystemError and return NULL to indicate a
  bug in the calling C code. CVE-2008-1887.

  backport r62261, r62271

17 years ago- Issues #2588, #2589: Fix potential integer underflow and overflow
Matthias Klose [Wed, 12 Nov 2008 07:08:51 +0000 (07:08 +0000)] 
- Issues #2588, #2589: Fix potential integer underflow and overflow
  conditions in the PyOS_vsnprintf C API function. CVE-2008-3144.

17 years ago- Issue #2586: Fix CVE-2008-1721, zlib crash from
Matthias Klose [Wed, 12 Nov 2008 07:02:24 +0000 (07:02 +0000)] 
- Issue #2586: Fix CVE-2008-1721, zlib crash from
  zlib.decompressobj().flush(val) when val is not positive.

17 years ago- Issue #1179: Fix CVE-2007-4965 and CVE-2008-1679, multiple integer
Matthias Klose [Wed, 12 Nov 2008 06:54:33 +0000 (06:54 +0000)] 
- Issue #1179: Fix CVE-2007-4965 and CVE-2008-1679, multiple integer
  overflows in the imageop and rgbimgmodule modules.

17 years ago- Moved entries added after the 2.4.5 release to a new 2.4.6. entry.
Matthias Klose [Wed, 12 Nov 2008 06:48:00 +0000 (06:48 +0000)] 
- Moved entries added after the 2.4.5 release to a new 2.4.6. entry.

17 years agoSecurity patches from Apple: prevent int overflow when allocating memory
Neal Norwitz [Thu, 31 Jul 2008 17:04:32 +0000 (17:04 +0000)] 
Security patches from Apple:  prevent int overflow when allocating memory

17 years agoBackport r65182. This change modified from using the unsigned max value
Neal Norwitz [Mon, 28 Jul 2008 05:22:45 +0000 (05:22 +0000)] 
Backport r65182.  This change modified from using the unsigned max value
to the signed max value similar to 2.5 and trunk.

Issue #2620: Overflow checking when allocating or reallocating memory
was not always being done properly in some python types and extension
modules.  PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have
all been updated to perform better checks and places in the code that
would previously leak memory on the error path when such an allocation
failed have been fixed.

17 years agoTag 2.4.5.
Martin v. Löwis [Tue, 11 Mar 2008 18:01:21 +0000 (18:01 +0000)] 
Tag 2.4.5.

17 years agoPrepare for 2.4.5 v2.4.5
Martin v. Löwis [Tue, 11 Mar 2008 17:59:53 +0000 (17:59 +0000)] 
Prepare for 2.4.5

17 years agoTagging for release of Python 2.4.5c1
Martin v. Löwis [Sun, 2 Mar 2008 19:34:25 +0000 (19:34 +0000)] 
Tagging for release of Python 2.4.5c1

17 years agoPrepare for 2.4.5c1 v2.4.5c1
Martin v. Löwis [Sun, 2 Mar 2008 19:33:40 +0000 (19:33 +0000)] 
Prepare for 2.4.5c1

17 years agoBackport of r60793:
Martin v. Löwis [Sun, 2 Mar 2008 19:20:32 +0000 (19:20 +0000)] 
Backport of r60793:
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.

17 years agoRevert the following revisions, as they don't fix security
Martin v. Löwis [Sun, 2 Mar 2008 17:47:51 +0000 (17:47 +0000)] 
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

17 years agoBackport r60104 + r60111 from trunk.
Gregory P. Smith [Sat, 19 Jan 2008 22:35:09 +0000 (22:35 +0000)] 
Backport r60104 + r60111 from trunk.
- Issue #1336: fix a race condition in subprocess.Popen if the garbage
  collector kicked in at the wrong time that would cause the process
  to hang when the child wrote to stderr.

18 years agoBug #1321: Fixed logic error in TimedRotatingFileHandler.__init__()
Vinay Sajip [Wed, 24 Oct 2007 10:51:23 +0000 (10:51 +0000)] 
Bug #1321: Fixed logic error in TimedRotatingFileHandler.__init__()

18 years ago- mark the findCaller 2-element tuple/3-element tuple change as new in 2.4
Matthias Klose [Thu, 16 Aug 2007 12:00:18 +0000 (12:00 +0000)] 
- mark the findCaller 2-element tuple/3-element tuple change as new in 2.4

18 years ago- fix build error with the findCaller backport
Matthias Klose [Thu, 16 Aug 2007 11:26:06 +0000 (11:26 +0000)] 
- fix build error with the findCaller backport

18 years agoAdd uuids for upcoming 2.4.5 release.
Martin v. Löwis [Fri, 3 Aug 2007 04:50:46 +0000 (04:50 +0000)] 
Add uuids for upcoming 2.4.5 release.

18 years agoMacOS build script:
Ronald Oussoren [Thu, 26 Jul 2007 21:31:09 +0000 (21:31 +0000)] 
MacOS build script:
- be more strict about the build environment
- update some of the 3th party libraries (later patchlevels)

18 years agoFix for Windows: close a temporary file before trying to delete it.
Hye-Shik Chang [Tue, 5 Jun 2007 19:28:15 +0000 (19:28 +0000)] 
Fix for Windows: close a temporary file before trying to delete it.

18 years ago(Backport from r55770)
Hye-Shik Chang [Tue, 5 Jun 2007 19:02:59 +0000 (19:02 +0000)] 
(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.

18 years agoUpdated documentation for SysLogHandler (#1720726).
Vinay Sajip [Fri, 25 May 2007 07:26:26 +0000 (07:26 +0000)] 
Updated documentation for SysLogHandler (#1720726).

18 years agoUpdated documentation for SysLogHandler (#1720726).
Vinay Sajip [Fri, 25 May 2007 07:22:57 +0000 (07:22 +0000)] 
Updated documentation for SysLogHandler (#1720726).

18 years agoUpdated findCaller documentation.
Vinay Sajip [Fri, 25 May 2007 07:17:37 +0000 (07:17 +0000)] 
Updated findCaller documentation.

18 years agoHTML-escape the plain traceback in cgitb's HTML output, to prevent
Georg Brandl [Tue, 15 May 2007 20:19:42 +0000 (20:19 +0000)] 
HTML-escape the plain traceback in cgitb's HTML output, to prevent
the traceback inadvertently or maliciously closing the comment and
injecting HTML into the error page.
 (backport from rev. 55348)

18 years agoBackported r51621 from p3yk:
Thomas Wouters [Sun, 25 Feb 2007 22:15:53 +0000 (22:15 +0000)] 
Backported r51621 from p3yk:

Don't use a fixed temporary name (gdbm).
Don't use our own temp name creation (dbm).

18 years agoMinor fix for currentframe (SF #1652788).
Vinay Sajip [Sat, 17 Feb 2007 01:39:17 +0000 (01:39 +0000)] 
Minor fix for currentframe (SF #1652788).

18 years agobackport: fix trace.py --ignore-dir
Skip Montanaro [Sun, 11 Feb 2007 18:37:54 +0000 (18:37 +0000)] 
backport: fix trace.py --ignore-dir

18 years agoBackport trunk revision 53527:
Thomas Wouters [Tue, 23 Jan 2007 15:09:19 +0000 (15:09 +0000)] 
Backport trunk revision 53527:

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....)

19 years agoFixed bug in fileConfig where _handlerList was not being cleared. (SF #1632328)
Vinay Sajip [Thu, 11 Jan 2007 20:26:05 +0000 (20:26 +0000)] 
Fixed bug in fileConfig where _handlerList was not being cleared. (SF #1632328)

19 years agoBackported change in shutdown(); now takes an optional handler-list argument.
Vinay Sajip [Thu, 11 Jan 2007 20:08:56 +0000 (20:08 +0000)] 
Backported change in shutdown(); now takes an optional handler-list argument.

19 years ago- idle: Honor the "Cancel" action in the save dialog (Debian bug #299092).
Matthias Klose [Thu, 11 Jan 2007 11:40:28 +0000 (11:40 +0000)] 
- idle: Honor the "Cancel" action in the save dialog (Debian bug #299092).

19 years ago- Make the documentation match the code and the docstring
Matthias Klose [Thu, 11 Jan 2007 10:27:33 +0000 (10:27 +0000)] 
- Make the documentation match the code and the docstring

19 years agoBug #1590891: random.randrange don't return correct value for big number
Raymond Hettinger [Wed, 20 Dec 2006 08:23:39 +0000 (08:23 +0000)] 
Bug #1590891: random.randrange don't return correct value for big number

19 years agoPatch by "cuppatea" (SF #1503765)
Vinay Sajip [Mon, 11 Dec 2006 14:33:45 +0000 (14:33 +0000)] 
Patch by "cuppatea" (SF #1503765)

19 years agoPatch by Jeremy Katz (SF #1609407)
Vinay Sajip [Mon, 11 Dec 2006 14:09:34 +0000 (14:09 +0000)] 
Patch by Jeremy Katz (SF #1609407)

19 years agoBackport of r52862.
Armin Rigo [Wed, 29 Nov 2006 22:07:38 +0000 (22:07 +0000)] 
Backport of r52862.

19 years agoJython compatibility fix: if uu.decode() opened its output file, be sure to
Andrew M. Kuchling [Mon, 20 Nov 2006 13:40:10 +0000 (13:40 +0000)] 
Jython compatibility fix: if uu.decode() opened its output file, be sure to
close it.

19 years agoAdd extra SHA tests
Andrew M. Kuchling [Mon, 20 Nov 2006 13:31:28 +0000 (13:31 +0000)] 
Add extra SHA tests

19 years agobackport of revision 52644
Ronald Oussoren [Tue, 7 Nov 2006 15:56:07 +0000 (15:56 +0000)] 
backport of revision 52644

19 years agoPoint users to the subprocess module in the docs for os.system, os.spawn*, os.popen2...
Andrew M. Kuchling [Fri, 27 Oct 2006 14:55:11 +0000 (14:55 +0000)] 
Point users to the subprocess module in the docs for os.system, os.spawn*, os.popen2, and the popen2 and commands modules

19 years ago[Bug #1542016] Report PCALL_POP value. This makes the return value of sys.callstats...
Andrew M. Kuchling [Fri, 27 Oct 2006 13:36:16 +0000 (13:36 +0000)] 
[Bug #1542016] Report PCALL_POP value.  This makes the return value of sys.callstats() match its docstring.

19 years agoAdd sections for a hypothetical future 2.4.5 release
Andrew M. Kuchling [Fri, 27 Oct 2006 13:34:05 +0000 (13:34 +0000)] 
Add sections for a hypothetical future 2.4.5 release

19 years ago[Bug #1562583] Mention the set_reuse_addr() method
Andrew M. Kuchling [Fri, 27 Oct 2006 13:07:10 +0000 (13:07 +0000)] 
[Bug #1562583] Mention the set_reuse_addr() method

19 years ago[Bug #1579796] Wrong syntax for PyDateTime_IMPORT in documentation. Reported by...
Andrew M. Kuchling [Thu, 26 Oct 2006 19:11:42 +0000 (19:11 +0000)] 
[Bug #1579796] Wrong syntax for PyDateTime_IMPORT in documentation.  Reported by David Faure.

19 years agoTagging for release of Python 2.4.4
Anthony Baxter [Wed, 18 Oct 2006 07:03:14 +0000 (07:03 +0000)] 
Tagging for release of Python 2.4.4

19 years agoregenerating tag. v2.4.4
Anthony Baxter [Wed, 18 Oct 2006 07:02:36 +0000 (07:02 +0000)] 
regenerating tag.

19 years agoBump buildno for 2.4.4.
Martin v. Löwis [Wed, 18 Oct 2006 06:50:22 +0000 (06:50 +0000)] 
Bump buildno for 2.4.4.

19 years agoTagging for release of Python 2.4.4
Anthony Baxter [Wed, 18 Oct 2006 05:13:30 +0000 (05:13 +0000)] 
Tagging for release of Python 2.4.4

19 years agopreparing for 2.4.4 final
Anthony Baxter [Tue, 17 Oct 2006 16:07:57 +0000 (16:07 +0000)] 
preparing for 2.4.4 final

19 years ago- Bug #1578513: Cross compilation was broken by a change to configure.
Anthony Baxter [Tue, 17 Oct 2006 16:03:36 +0000 (16:03 +0000)] 
- Bug #1578513: Cross compilation was broken by a change to configure.
Repair so that it's back to how it was in 2.4.3.

Needs to be forward-ported to 2.5 branch and trunk.

19 years agoTagging for release of Python 2.4.4c1
Anthony Baxter [Wed, 11 Oct 2006 04:32:52 +0000 (04:32 +0000)] 
Tagging for release of Python 2.4.4c1

19 years agowhat month is it again? I get confused... v2.4.4c1
Anthony Baxter [Tue, 10 Oct 2006 17:28:33 +0000 (17:28 +0000)] 
what month is it again? I get confused...

19 years agopreparing for 2.4.4c1
Anthony Baxter [Tue, 10 Oct 2006 16:44:16 +0000 (16:44 +0000)] 
preparing for 2.4.4c1

19 years agonote the previous checkin
Anthony Baxter [Tue, 10 Oct 2006 16:43:06 +0000 (16:43 +0000)] 
note the previous checkin

19 years agoNote that there are no longer warnings when building
Tim Peters [Tue, 10 Oct 2006 16:42:09 +0000 (16:42 +0000)] 
Note that there are no longer warnings when building
_bsddb on Windows (Martin recently repaired that -- thanks!).

19 years agoBackport 50567
Anthony Baxter [Tue, 10 Oct 2006 16:20:41 +0000 (16:20 +0000)] 
Backport 50567
#1494314: Fix a regression with high-numbered sockets in 2.4.3. This
means that select() on sockets > FD_SETSIZE (typically 1024) work again.
The patch makes sockets use poll() internally where available.

19 years agoIgnore libcmt, not msvcrt.
Martin v. Löwis [Tue, 10 Oct 2006 13:50:39 +0000 (13:50 +0000)] 
Ignore libcmt, not msvcrt.

19 years agoUpdate distutils version number to match the library version number
Anthony Baxter [Tue, 10 Oct 2006 08:10:42 +0000 (08:10 +0000)] 
Update distutils version number to match the library version number

19 years agofix permission problem in the generated installer
Ronald Oussoren [Tue, 10 Oct 2006 07:53:36 +0000 (07:53 +0000)] 
fix permission problem in the generated installer

19 years agoBackport rev 51262 from trunk -- squashes a compiler warning on Windows
Tim Peters [Mon, 9 Oct 2006 23:37:58 +0000 (23:37 +0000)] 
Backport rev 51262 from trunk -- squashes a compiler warning on Windows
about truly wrong code.

Checkin comment from 51262:

Can't return NULL from a void function.  If there is a memory error,
about the best we can do is call PyErr_WriteUnraisable and go on.
We won't be able to do the call below either, so verify delstr is valid.

19 years agoMove fetching of encoding test files from the end of the
Tim Peters [Mon, 9 Oct 2006 23:18:44 +0000 (23:18 +0000)] 
Move fetching of encoding test files from the end of the
Windows builbot's "build" step to the start of its "test"
step.

This is poke-and-hope.  The hope is that compilation failures
on Windows will become visible to the buildbot (bsddb has
apparently been failing to compile in 2.4 on Windows "for
some time" now, but the buildbots haven't noticed that).

19 years agoBackport of the pieces of trunk rev 46589 relevant to
Tim Peters [Mon, 9 Oct 2006 20:24:45 +0000 (20:24 +0000)] 
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 ;-)

19 years agoBackport r45505, r45573, r45576
Martin v. Löwis [Mon, 9 Oct 2006 19:29:06 +0000 (19:29 +0000)] 
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.

19 years ago[Partial backport of r45947 | neal.norwitz]
Andrew M. Kuchling [Mon, 9 Oct 2006 18:42:49 +0000 (18:42 +0000)] 
[Partial backport of r45947 | neal.norwitz]

Fix problems found by Coverity.

longobject.c: also fix an ssize_t problem
  <a> could have been NULL, so hoist the size calc to not use <a>.

[The ssize_t change isn't needed for 2.4.  The other changes in this revision
 are to modules not present in 2.4. --amk]

19 years ago[Partial backport of r45947 | neal.norwitz]
Andrew M. Kuchling [Mon, 9 Oct 2006 18:30:13 +0000 (18:30 +0000)] 
[Partial backport of r45947 | neal.norwitz]

Fix problems found by Coverity.

_ssl.c: under fail: self is DECREF'd, but it would have been NULL.

_csv.c: I'm not sure if lineterminator could have been anything other than
a string.  However, other string method calls are checked, so check this
one too.

19 years ago[Backport r42951 | guido.van.rossum]
Andrew M. Kuchling [Mon, 9 Oct 2006 18:19:01 +0000 (18:19 +0000)] 
[Backport r42951 | guido.van.rossum]

Fix three nits found by Coverity, adding null checks and comments.

[This commit only makes two changes.  One change in the original patch
 is just adding a comment, and another adds a 'base != NULL' check to
 silence Coverity, but a comment adds that that base is never going to
 be NULL.  I didn't backport that change. --amk]

19 years ago[Bug #1545341] Let the 'classifiers' parameter be a tuple as well as a list.
Andrew M. Kuchling [Mon, 9 Oct 2006 17:15:39 +0000 (17:15 +0000)] 
[Bug #1545341] Let the 'classifiers' parameter be a tuple as well as a list.

19 years agoBackport of r52238
Ronald Oussoren [Sun, 8 Oct 2006 18:20:10 +0000 (18:20 +0000)] 
Backport of r52238

19 years agoBackport of missing part of r52229
Ronald Oussoren [Sun, 8 Oct 2006 17:43:31 +0000 (17:43 +0000)] 
Backport of missing part of r52229

19 years agoPort of universal binary support for Mac OSX from python 2.5. This takes away
Ronald Oussoren [Sun, 8 Oct 2006 17:41:25 +0000 (17:41 +0000)] 
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.

19 years agoMove an old news entry about cjkcodecs to the right place; "Extension
Hye-Shik Chang [Sun, 8 Oct 2006 14:24:26 +0000 (14:24 +0000)] 
Move an old news entry about cjkcodecs to the right place; "Extension
Modules".

19 years agoBackport from trunk r52223:
Hye-Shik Chang [Sun, 8 Oct 2006 13:56:00 +0000 (13:56 +0000)] 
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)

19 years ago[Backport r43695 | neal.norwitz]
Andrew M. Kuchling [Fri, 6 Oct 2006 19:26:14 +0000 (19:26 +0000)] 
[Backport r43695 | neal.norwitz]

Remove dead code (reported by HP compiler).

Can probably be backported if anyone cares.

19 years ago[Backport r46044 | neal.norwitz]
Andrew M. Kuchling [Fri, 6 Oct 2006 19:09:36 +0000 (19:09 +0000)] 
[Backport r46044 | neal.norwitz]

Fix #132 from Coverity, retval could have been derefed
if a continue inside a try failed.

19 years ago[Backport r46602 | neal.norwitz]
Andrew M. Kuchling [Fri, 6 Oct 2006 18:59:10 +0000 (18:59 +0000)] 
[Backport r46602 | neal.norwitz]

Patch #1357836:

Prevent an invalid memory read from test_coding in case the done flag is set.
In that case, the loop isn't entered.  I wonder if rather than setting
the done flag in the cases before the loop, if they should just exit early.

This code looks like it should be refactored.

Backport candidate (also the early break above if decoding_fgets fails)

19 years agoCase fixes
Andrew M. Kuchling [Fri, 6 Oct 2006 10:38:10 +0000 (10:38 +0000)] 
Case fixes

19 years agoAdd user32.lib to the libraries. Fixes #1571023.
Martin v. Löwis [Fri, 6 Oct 2006 07:01:45 +0000 (07:01 +0000)] 
Add user32.lib to the libraries. Fixes #1571023.

19 years ago- update links
Fred Drake [Fri, 6 Oct 2006 00:02:58 +0000 (00:02 +0000)] 
- update links
- remove Sleepycat name now that they have been bought

19 years agoInclude sgml_input.html.
Martin v. Löwis [Thu, 5 Oct 2006 20:04:53 +0000 (20:04 +0000)] 
Include sgml_input.html.

19 years ago[Backport r50679 | neal.norwitz. This is the last Klocwork bug to be
Andrew M. Kuchling [Thu, 5 Oct 2006 19:42:49 +0000 (19:42 +0000)] 
[Backport r50679 | neal.norwitz.  This is the last Klocwork bug to be
 backported.]

Use sizeof(buffer) instead of duplicating the constants to ensure they won't
be wrong.

The real change is to pass (bufsz - 1) to PyOS_ascii_formatd and 1
to strncat.  strncat copies n+1 bytes from src (not dest).

Reported by Klocwork #58.

19 years ago[Backport r50681 | neal.norwitz]
Andrew M. Kuchling [Thu, 5 Oct 2006 19:38:17 +0000 (19:38 +0000)] 
[Backport r50681 | neal.norwitz]

PyFunction_SetDefaults() is documented as taking None or a tuple.
A NULL would crash the PyTuple_Check().  Now make NULL return a SystemError.

Reported by Klocwork #73.

19 years ago[Backport r51222 | neal.norwitz -- if you hack the code to set r=NULL,
Andrew M. Kuchling [Thu, 5 Oct 2006 19:32:52 +0000 (19:32 +0000)] 
[Backport r51222 | neal.norwitz -- if you hack the code to set r=NULL,
 you find that Python does print "MemoryError".  There's no traceback
 and no indication of which line of code is responsible, but it's
 better than a segfault.]

Handle NULL nodes while parsing.  I'm not entirely sure this is correct.
There might be something else that needs to be done to setup the error.

Klocwork #295.

19 years ago[Backport r51246 | neal.norwitz]
Andrew M. Kuchling [Thu, 5 Oct 2006 19:25:26 +0000 (19:25 +0000)] 
[Backport r51246 | neal.norwitz]

Handle a whole lot of failures from PyString_FromInternedString().

Should fix most of Klocwork 234-272.

[Backport r51400 | neal.norwitz]

Move initialization of interned strings to before allocating the
object so we don't leak op.  (Fixes an earlier patch to this code)

Klockwork #350

19 years ago[Backport r51221 | neal.norwitz -- the original commit message is wrong;
Andrew M. Kuchling [Thu, 5 Oct 2006 19:08:30 +0000 (19:08 +0000)] 
[Backport r51221 | neal.norwitz -- the original commit message is wrong;
 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.

19 years ago[Backport r51220 | neal.norwitz]
Andrew M. Kuchling [Thu, 5 Oct 2006 19:01:50 +0000 (19:01 +0000)] 
[Backport r51220 | neal.norwitz]

It's highly unlikely, though possible for PyEval_Get*() to return NULLs.
So be safe and do an XINCREF.

Klocwork # 221-222.

19 years ago[Backport r50685 | neal.norwitz]
Andrew M. Kuchling [Thu, 5 Oct 2006 18:57:54 +0000 (18:57 +0000)] 
[Backport r50685 | neal.norwitz]

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.

19 years ago[Backport r50783 | neal.norwitz. The bytes_left code is complicated,
Andrew M. Kuchling [Thu, 5 Oct 2006 18:49:36 +0000 (18:49 +0000)] 
[Backport r50783 | neal.norwitz.  The bytes_left code is complicated,
 but looks correct on a casual inspection and hasn't been modified
 in the trunk.  Does anyone want to review further?]

Ensure we don't write beyond errText.  I think I got this right, but
it definitely could use some review to ensure I'm not off by one
and there's no possible overflow/wrap-around of bytes_left.
Reported by Klocwork #1.

Fix a problem if there is a failure allocating self->db.
Found with failmalloc.

19 years ago[Partial backport of r51218 | neal.norwitz -- the changes to ast.c, symtable.c,
Andrew M. Kuchling [Thu, 5 Oct 2006 18:37:08 +0000 (18:37 +0000)] 
[Partial backport of r51218 | neal.norwitz -- the changes to ast.c, symtable.c,
 and _elementtree.c weren't applicable]

Klocwork made another run and found a bunch more problems.
This is the first batch of fixes that should be easy to verify based on context.
This fixes problem numbers: 220 (ast), 323-324 (symtable),
321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).