浏览代码

Fix infinite loop in putgrent (forgotten increment).

Manuel Novoa III 22 年之前
父节点
当前提交
386eee7b49
共有 1 个文件被更改,包括 1 次插入0 次删除
  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);