summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-02-12 22:13:26 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-02-12 22:13:26 (GMT)
commit5c4d5bfaf593587032e872c30e32ab129ca15462 (patch)
treefe897df6776a52a36970f2bff5b389e6d58a9c6d /Python
parentb86c549c7c41d5f8fa6f50ed3e58f3a1d62a1c4e (diff)
downloadcpython-5c4d5bfaf593587032e872c30e32ab129ca15462.zip
cpython-5c4d5bfaf593587032e872c30e32ab129ca15462.tar.gz
cpython-5c4d5bfaf593587032e872c30e32ab129ca15462.tar.bz2
Related to SF bug 132008 (PyList_Reverse blows up).
_testcapimodule.c make sure PyList_Reverse doesn't blow up again getargs.c assert args isn't NULL at the top of vgetargs1 instead of waiting for a NULL-pointer dereference at the end
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index aa4a228..00f298a 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -84,6 +84,8 @@ vgetargs1(PyObject *args, char *format, va_list *p_va, int compat)
int i, len;
char *msg;
+ assert(compat || (args != (PyObject*)NULL));
+
for (;;) {
int c = *format++;
if (c == '(' /* ')' */) {