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
This commit is contained in:
Tim Peters 2001-02-12 22:13:26 +00:00
parent b86c549c7c
commit 5c4d5bfaf5
2 changed files with 48 additions and 0 deletions

View file

@ -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 == '(' /* ')' */) {