Project

General

Profile

« Previous | Next » 

Revision 46449

merge revision(s) r45287,r45288,r45289,r45290: [Backport #9600]

process.c: tmp buffer instead of alloca

* process.c (OBJ2UID1, OBJ2GID1): separate from OBJ2UID and

OBJ2GID respectively, need given buffers.

* process.c (OBJ2UID, OBJ2GID): no longer need PREPARE_GETPWNAM

and PREPARE_GETGRNAM.

* process.c (obj2uid, obj2gid): use tmp buffer instead of alloca

to get rid of potential stack overflow.
* process.c (obj2uid, obj2gid): now getpwnam_r() and getgrnam_r()
may need larger buffers than sysconf values, so retry with
expanding the buffer when ERANGE is returned.
[ruby-core:61325] [Bug #9600]