Explorar o código

Fix infinite loop in putgrent (forgotten increment).

Manuel Novoa III %!s(int64=23) %!d(string=hai) anos
pai
achega
386eee7b49
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      libc/pwd_grp/pwd_grp.c

+ 1 - 0
libc/pwd_grp/pwd_grp.c

@@ -803,6 +803,7 @@ int putgrent(const struct group *__restrict p, FILE *__restrict f)
 				if (fprintf(f, fmt, *m) < 0) {
 					break;
 				}
+				++m;
 				fmt = format;
 			} while (1);