Restrict the amount to read when --stop-at-size is active so that reads, as well as writes, never go past --size bytes (#166).

This commit is contained in:
Andrew Wood
2025-09-30 22:27:25 +01:00
parent 6a1ad7d374
commit be066f6c8c
4 changed files with 43 additions and 17 deletions
+1
View File
@@ -395,6 +395,7 @@ struct pvstate_s {
size_t written_but_not_consumed; /* bytes in the output pipe, unread */
off_t total_bytes_read; /* total bytes read */
off_t total_written; /* total bytes or lines written */
off_t transferred; /* amount transferred (written - unconsumed) */