[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-23 Thread Joe Jevnik


Change by Joe Jevnik :


--
pull_requests: +7946

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread miss-islington


miss-islington  added the comment:


New changeset ec7562068fd123969ab4d27e11f4070271c72e16 by Miss Islington (bot) 
in branch '3.6':
bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192)
https://github.com/python/cpython/commit/ec7562068fd123969ab4d27e11f4070271c72e16


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread miss-islington


miss-islington  added the comment:


New changeset 48d2aeb009f8e58b1efae00ee0e225951b58737e by Miss Islington (bot) 
in branch '3.7':
bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192)
https://github.com/python/cpython/commit/48d2aeb009f8e58b1efae00ee0e225951b58737e


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ef19fd200d0768919f1658466f8b6080b191fba0 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192). (GH-8255)
https://github.com/python/cpython/commit/ef19fd200d0768919f1658466f8b6080b191fba0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7788

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7784

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7783

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 504373c59b48f1ea12132d515459022730db6047 by Serhiy Storchaka in 
branch 'master':
bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192)
https://github.com/python/cpython/commit/504373c59b48f1ea12132d515459022730db6047


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +7744
stage: test needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2015-04-12 Thread Larry Hastings

New submission from Larry Hastings:

tl;dr: skipitem() in Python/getsargs.c doesn't know about the 'w*' format unit, 
which could lead to a crash.  It should know about it.

--

If: 
* you have an extension that parses its arguments with
  PyArg_ParseTupleAndKeywords (or its cousins),
* you have optional positional parameters, and
* you run out of positional arguments

CPython will call skipitem() to skip over the remaining positional parameters 
so it can process keyword arguments.  It does this by knowing all the format 
units, and iterating over them and throwing away the various varargs pointers 
until it hits the keyword arguments part of the format string.

Since nobody ever explained about the w* format unit to it, that means when 
it sees 'w*' it will misinterpret it.

In both 2.7 and 3.x, it'll interpret it as 'w', throw away one char * item 
from varargs, then the next thing that tries to parse a format unit (skipitem 
or convertsimple) will see the '*' and throw an 'impossiblebad format char' 
exception.

(It's another bug that skipitem() supports 'w' and 'w#' in Python 3, but I 
filed that separately as #23926 .)

--
assignee: larry
components: Interpreter Core
messages: 240588
nosy: larry
priority: low
severity: normal
stage: test needed
status: open
title: getargs.c skipitem() doesn't skip 'w*'
type: crash
versions: Python 2.7, Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23927
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com