This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Incorrect argument parsing in _ssl
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: alex, benjamin.peterson, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou, python-dev, serhiy.storchaka
Priority: normal Keywords:

Created on 2015-04-06 12:01 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg240151 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-04-06 12:01
Argument parsing code for functions _ssl.enum_certificates() and _ssl.enum_crls() look not correct. 

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|s:enum_certificates",
                                     kwlist, &store_name)) {
        return NULL;
    }

The format contains codes for two string arguments. But only one address (&store_name) is passed. And kwlist contains only one member, "store_name".

These functions are provided only on Windows, so I can't check what happen if call them with two string arguments. May be crash or memory corruption.
msg240162 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2015-04-06 17:05
Good catch.
msg240163 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-04-06 17:06
New changeset e0ba8d3bed7e by Benjamin Peterson in branch '3.4':
remove extra arguments in arg parsing format codes (closes #23875)
https://hg.python.org/cpython/rev/e0ba8d3bed7e

New changeset 5f27e13faae2 by Benjamin Peterson in branch '2.7':
remove extra arguments in arg parsing format codes (closes #23875)
https://hg.python.org/cpython/rev/5f27e13faae2

New changeset c9b9fb86d3fa by Benjamin Peterson in branch 'default':
merge 3.4 (#23875)
https://hg.python.org/cpython/rev/c9b9fb86d3fa
History
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68063
2015-04-06 17:06:45python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg240163

resolution: fixed
stage: resolved
2015-04-06 17:05:20benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg240162
2015-04-06 12:01:52serhiy.storchakacreate