In release mode calling of 'groupadd -o -g 11 cdrom' caught segmentation fault in putgrent function, /libc/pwd_grp/pwd_grp.c, line 806 if (!*m) { if (__fputc_unlocked('\n', f) >= 0) { rv = 0; } break; } The reason is in null value of 'm' pointer. Proposed fix: diff --git a/libc/pwd_grp/pwd_grp.c b/libc/pwd_grp/pwd_grp.c index 0e7c7f7..2361b9b 100644 --- a/libc/pwd_grp/pwd_grp.c +++ b/libc/pwd_grp/pwd_grp.c @@ -803,7 +803,7 @@ int putgrent(const struct group *__restrict p, FILE *__restrict f) m = p->gr_mem; do { - if (!*m) { + if (!m || !*m) { if (__fputc_unlocked('\n', f) >= 0) { rv = 0; }
Created attachment 5516 [details] Proposed patch