| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Handle malloc failure.
Klocwork 281
|
| |
|
|
|
|
|
| |
Free coding spec (cs) if there was an error to prevent mem leak.
Maybe backport candidate.
[Bugfix seems applicable to 2.4 to me. --amk]
|
| | |
|
| |
|
|
| |
by Coverity.
|
| |
|
|
|
| |
Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter.
Also bug #1435487 (dup).
|
| |
|
|
|
| |
Apply SF patch #1101726: Fix buffer overrun in tokenizer.c when a source file
with a PEP 263 encoding declaration results in long decoded line.
|
| |
|
|
|
|
|
|
| |
In a threads-disabled build, typing Ctrl-C into a raw_input() crashed,
because (essentially) I didn't realise that PY_BEGIN/END_ALLOW_THREADS
actually expanded to nothing under a no-threads build, so if you somehow
NULLed out the threadstate (e.g. by calling PyThread_SaveThread) it would
stay NULLed when you return to Python. Argh!
|
| |
|
|
| |
a few remaining calls to signal() were converted to PyOS_setsig().
|
| |
|
|
|
|
|
| |
modes like non-interactive modes. This allows for non-latin-1 users
to write unicode strings directly and sets Japanese users free from
weird manual escaping <wink> in shift_jis environments.
(Reviewed by Martin v. Loewis)
|
| |
|
|
|
| |
"@ seems the syntax that everybody can hate equally"
Implementation by Mark Russell, from SF #979728.
|
| |
|
|
| |
[ 987287 ] Python 2.4a1, interpreter hanging on Keyboard Interrupt
|
| | |
|
| |
|
|
| |
isn't always set to an integer value when it's defined.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ 960406 ] unblock signals in threads
although the changes do not correspond exactly to any patch attached to
that report.
Non-main threads no longer have all signals masked.
A different interface to readline is used.
The handling of signals inside calls to PyOS_Readline is now rather
different.
These changes are all a bit scary! Review and cross-platform testing
much appreciated.
|
| | |
|
| |
|
|
|
| |
Change %08l to %p to print a pointer.
Will backport to 2.3.
|
| | |
|
| |
|
|
| |
mid 1990. Remove an untrue XXX comment.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
A change from Duncan Booth, to deal with changes in the way pgen gets
built. Note that graminit.[ch] aren't normally built on Windows (they're
obtained from CVS).
|
| |
|
|
| |
riscospath.extsep, and use os.extsep throughout.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
work. This includes some more code that used to be part of pgen in
the main parser; I'm okay with that. I'll see if the Windows build
needs work next.
|
| |
|
|
|
|
| |
the build, so I'm restoring it. I'm not sure what Neal's intent was,
since the line following the one he removed was "REQN(i, 1)" so i is
obviously used. ;)
|
| | |
|
| |
|
|
|
|
| |
Remove the usage of PyErr_WarnExplicit() since this could cause
sensitive information from the source files to appear in e.g.
log files.
|
| |
|
|
|
|
|
|
|
| |
with an indented code block but no newline would raise SyntaxError.
This would have been a four-line change in parsetok.c... Except
codeop.py depends on this behavior, so a compilation flag had to be
invented that causes the tokenizer to revert to the old behavior;
this required extra changes to 2 .h files, 2 .c files, and 2 .py
files. (Fixes SF bug #501622.)
|
| |
|
|
| |
mark. Added unit test.
|
| |
|
|
|
| |
Ensure that the 'size' arg is correctly passed to the encoding reader to
prevent buffer overflows.
|
| | |
|
| |
|
|
| |
Cast param to isalnum() to int.
|
| |
|
|
|
|
| |
(see Patch 512981). I changed stdin to sys_stdin in the body of the
function, but did not change stderr to sys_stdout, though I suspect that may
be the correct course. I don't know the code involved well enough to judge.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
-- replace then with slightly faster PyObject_Call(o,a,NULL). (The
difference is that the latter requires a to be a tuple; the former
allows other values and wraps them in a tuple if necessary; it
involves two more levels of C function calls to accomplish all that.)
|
| |
|
|
|
| |
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
be longer than the old string.
|
| | |
|
| |
|
|
| |
this was trying to assert, but the name it referenced didn't exist.
|