Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

The latest patch, os-getgroups-v2.patch, seems to have the same bug as I 
reported in msg99926:

"""
The crash that I see is apparently due to underallocated  memory:

 alt_grouplist = PyMem_Malloc(n);

should be

 alt_grouplist = PyMem_Malloc(n * sizeof(gid_t));
"""

I no longer see the crash, but did not have a chance to investigate it further. 
 In any case, PyMem_Malloc(n) is clearly wrong and should be replaced by 
PyMem_Malloc(n * sizeof(gid_t)) or maybe better by PyMem_New(gid_t, n).

There are no tests in the patch and issue7900-tests.diff tests return "FAILED 
(failures=3, errors=2)" when ran as a superuser.

----------
nosy: +belopolsky -Alexander.Belopolsky
stage: patch review -> unit test needed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7900>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to