Kaydet (Commit) 13d0ed13 authored tarafından Guido van Rossum's avatar Guido van Rossum

prevent core dump for old getargs() with NULL arg

üst c054a663
......@@ -179,6 +179,13 @@ vgetargs1(args, format, va, compat)
return 0;
}
else if (min == 1 && max == 1) {
if (args == NULL) {
sprintf(msgbuf,
"%s requires at least one argument",
fname==NULL ? "function" : fname);
err_setstr(TypeError, msgbuf);
return 0;
}
msg = convertitem(args, &format, &va, levels, msgbuf);
if (msg == NULL)
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment