Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ctypes: Remove misleading comment about tuple support in _as_parameter_ and add regression test #142174

Copy link
Copy link
@CodeMaverick-143

Description

@CodeMaverick-143
Issue body actions

Bug report

Bug description:

Modules/_ctypes/callproc.c contained a comment (marked XXX) stating that as_parameter
allows constructing arbitrary tuples and passing them, describing this convention as "dangerous".
Analysis confirms that
ctypes
does not support returning tuples from as_parameter for default conversions. Attempting to do so raises a "TypeError" (wrapped in an ArgumentError), meaning the described security risk does not exist in the current codebase.

CPython versions tested on:

3.13

Operating systems tested on:

macOS

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    Status
    Todo
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.