Browse Source

Fix infinite loop in putgrent (forgotten increment).

Manuel Novoa III 21 năm trước cách đây
mục cha
commit
386eee7b49
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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);