-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-95380: Removing the 1024 bytes limit in the fcntl_fcntl_impl and fcntl_ioctl_impl functions. #95439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ва разных варианта исправления.
…pl убрал buf[len] = '\0';
The following commit authors need to sign the Contributor License Agreement: |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Пулл-реквест pythongh-95429 внёс по сути те же изменения, так что фокусируемся на отсутствующем там fcntl_ioctl_impl.
PyErr_SetString(PyExc_ValueError, | ||
"ioctl string arg too long"); | ||
|
||
PyObject *o = PyBytes_FromStringAndSize(NULL, len); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not decref in the failure/error code path(s)..
also on line 248 : could not you directly returns it instead of re-creating another object ?
} | ||
else { | ||
ret = ioctl(fd, code, arg); | ||
PyObject *o = PyBytes_FromStringAndSize(NULL, len); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not be decref/freed in some code path(s) below ?
Консольная команда, использованная для обновления: python Tools/clinic/clinic.py Modules/fcntlmodule.c Если этого не сделать, автоматическая проверка пулл-реквеста увидит рассинхронизацию, и у пул-реквеста в статусах будет крестик напротив "Tests / Check if generated files are up to date".
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Remove `fcntl_fcntl_impl` keeping `fcntl_ioctl_impl`
Ah, now I know how to do it... Fixed. |
Also, in the fcntl_ioctl_impl function, I removed adding zero to the end of the parameter for ioctl. Removed - works.