FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.7] bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) by miss-islington · Pull Request #20455 · python/cpython · GitHub

Repository navigation

[3.7] bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914) - #20455

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-29a1384-3.7
May 27, 2020
Merged

miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-29a1384-3.7

Conversation

miss-islington commented May 27, 2020 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

ctypes now raises an ArgumentError when a callback
is invoked with more than 1024 arguments.

The ctypes module allocates arguments on the stack in
ctypes_callproc() using alloca(), which is problematic
when large numbers of arguments are passed. Instead
of a stack overflow, this commit raises an ArgumentError
if more than 1024 parameters are passed.
(cherry picked from commit 29a1384)

Co-authored-by: Sean Gillespie sean@swgillespie.me

https://bugs.python.org/issue13097

ctypes now raises an ArgumentError when a callback
is invoked with more than 1024 arguments.

The ctypes module allocates arguments on the stack in
ctypes_callproc() using alloca(), which is problematic
when large numbers of arguments are passed. Instead
of a stack overflow, this commit raises an ArgumentError
if more than 1024 parameters are passed.
(cherry picked from commit 29a1384)

Co-authored-by: Sean Gillespie <sean@swgillespie.me>

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, good bot.

Copy link
Copy Markdown
Contributor Author

@swgillespie and @vstinner: Status check is done, and it's a success ✅ .

miss-islington merged commit 1c4dcaf into python:3.7 May 27, 2020
miss-islington deleted the backport-29a1384-3.7 branch May 27, 2020 15:51

Copy link
Copy Markdown
Contributor Author

@swgillespie and @vstinner: Status check is done, and it's a success ✅ .

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL