]> granicus.if.org Git - python/commit
tuple(3,4,5,x=2) dumped core on my box. vgetargskeywords() overindexed
authorTim Peters <tim.peters@gmail.com>
Sat, 27 Oct 2001 00:46:09 +0000 (00:46 +0000)
committerTim Peters <tim.peters@gmail.com>
Sat, 27 Oct 2001 00:46:09 +0000 (00:46 +0000)
commita9f4739a1b315417d5b79055a64ee8dd11d1b173
treebee52848ea3b622342d2bdc6f4741bc65c9f2e07
parentf4331c1c3874651cfa872c9dda8ab504e0129349
tuple(3,4,5,x=2) dumped core on my box.  vgetargskeywords() overindexed
the kwlist vector whenever there was a mix of positional and keyword
arguments, and the number of positional arguments exceeded the length
of the kwlist vector.  If there was just one more positional arg than
keyword, the kwlist-terminating NULL got passed to PyMapping_HasKeyString,
which set an internal error that vgetargskeywords() then squashed (but
it's impossible to say whether it knew it was masking an error).  If
more than one more positional argument, it went on to pass random trash
to PyMapping_HasKeyString, which is why the example at the start
happened to kill the process.

Pure bugfix candidate.
Python/getargs.c