summaryrefslogtreecommitdiffstats
path: root/Python/getargs.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/getargs.c')
-rw-r--r--Python/getargs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index bec9816..539925e 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -2641,6 +2641,11 @@ skipitem(const char **p_format, va_list *p_va, int flags)
if (p_va != NULL) {
(void) va_arg(*p_va, char **);
}
+ if (c == 'w' && *format != '*')
+ {
+ /* after 'w', only '*' is allowed */
+ goto err;
+ }
if (*format == '#') {
if (p_va != NULL) {
(void) va_arg(*p_va, Py_ssize_t *);