Skip to content
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

bpo-35161: Fix stack-use-after-scope in grp.getgr{nam,gid} and pwd.getpw{nam,uid} #10319

Merged
merged 2 commits into from
Nov 4, 2018

Conversation

izbyshev
Copy link
Contributor

@izbyshev izbyshev commented Nov 4, 2018

@serhiy-storchaka serhiy-storchaka changed the title bpo-35161: Fix stack-use-after-scope in grp.getgr{nam,gid} and pwd.ge… bpo-35161: Fix stack-use-after-scope in grp.getgr{nam,gid} and pwd.getpw{nam,uid} Nov 4, 2018
@@ -124,11 +124,11 @@ grp_getgrgid_impl(PyObject *module, PyObject *id)
Py_DECREF(py_int_id);
}
#ifdef HAVE_GETGRGID_R
Py_BEGIN_ALLOW_THREADS
int status;
Py_ssize_t bufsize;
struct group grp;
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add a comment about grp is used via the p pointer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added comments.

@serhiy-storchaka serhiy-storchaka merged commit e359bc2 into python:master Nov 4, 2018
@izbyshev izbyshev deleted the bpo-35161 branch November 4, 2018 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants