Kaydet (Commit) 231a41e7 authored tarafından Guido van Rossum's avatar Guido van Rossum

Add explicit check for correct next character in format at end of

format.  This will complain about illegal formats like "O#" instead of
ignoring the '#'.
üst eefcba61
......@@ -256,6 +256,13 @@ vgetargs1(args, format, p_va, compat)
return 0;
}
}
if (*format != '\0' && !isalpha(*format) &&
*format != '|' && *format != ':' && *format != ';') {
PyErr_Format(PyExc_SystemError,
"bad format string: %s", formatsave);
return 0;
}
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