summaryrefslogtreecommitdiff
path: root/Python/getargs.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-02-12 22:13:26 +0000
committerTim Peters <tim.peters@gmail.com>2001-02-12 22:13:26 +0000
commiteb4117dad91de9cee842a71811d6e65b0fb879be (patch)
treeb831dd47673b5ac564cba7947d3d17dc2ac34baa /Python/getargs.c
parent56d87377cbfa2f5835a1ca46ab735ad11c6d8681 (diff)
downloadcpython-eb4117dad91de9cee842a71811d6e65b0fb879be.tar.gz
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/getargs.c')
-rw-r--r--Python/getargs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index aa4a22828d..00f298a627 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 == '(' /* ')' */) {