Currently, the mainloop in fgets() does: while (n > 1) { ... } But it never decrements n. -Adrian -------------- next part -------------- --- fgets.c-old 2005-05-26 16:30:58.000000000 -0700 +++ fgets.c 2005-05-26 16:32:33.000000000 -0700 @@ -22,6 +22,7 @@ *p++ = ch; if ( ch == '\n' ) break; + n --; } if ( n ) *p = '\0';
Seemingly Similar Threads
- R segfault in fgets from do_system under high memory use (PR#14008)
- make world error: symbols.c:123: warning: ignoring return value of ''fgets''
- [Bug 1365] New: sftp exits immediately after connection (fgets EAGAIN)
- [PATCH] core: Add support for BLS Type 1 entries
- [klibc:update-dash] expand: Fix buffer overflow in expandmeta