Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit078da88

Browse files
authored
[3.12]gh-69214: Fix fcntl.ioctl() request type (#119498) (#119505)
gh-69214: Fix fcntl.ioctl() request type (#119498)Use an 'unsigned long' instead of an 'unsigned int' for the requestparameter of fcntl.ioctl() to support requests larger than UINT_MAX.(cherry picked from commit92fab33)
1 parent2b091b9 commit078da88

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix ``fcntl.ioctl()`` *request* parameter: use an ``unsigned long`` instead of
2+
an ``unsigned int`` for the *request* parameter of:func:`fcntl.ioctl` to
3+
support requests larger than ``UINT_MAX``. Patch by Victor Stinner.

‎Modules/clinic/fcntlmodule.c.h‎

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎Modules/fcntlmodule.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fcntl_fcntl_impl(PyObject *module, int fd, int code, PyObject *arg)
108108
fcntl.ioctl
109109
110110
fd: fildes
111-
request as code:unsigned_int(bitwise=True)
111+
request as code:unsigned_long(bitwise=True)
112112
arg as ob_arg: object(c_default='NULL') = 0
113113
mutate_flag as mutate_arg: bool = True
114114
/
@@ -144,9 +144,9 @@ code.
144144
[clinic start generated code]*/
145145

146146
staticPyObject*
147-
fcntl_ioctl_impl(PyObject*module,intfd,unsignedintcode,
147+
fcntl_ioctl_impl(PyObject*module,intfd,unsignedlongcode,
148148
PyObject*ob_arg,intmutate_arg)
149-
/*[clinic end generated code: output=7f7f5840c65991be input=967b4a4cbeceb0a8]*/
149+
/*[clinic end generated code: output=3d8eb6828666cea1 input=cee70f6a27311e58]*/
150150
{
151151
#defineIOCTL_BUFSZ 1024
152152
/* We use the unsigned non-checked 'I' format for the 'code' parameter

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp