]> git.ipfire.org Git - thirdparty/coreutils.git/commit
Prevent a counter buffer overrun when numbering lines and when
authorJim Meyering <jim@meyering.net>
Sat, 21 Oct 2000 19:16:37 +0000 (19:16 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 21 Oct 2000 19:16:37 +0000 (19:16 +0000)
commit51e2ffc52458de9b96079cf2b9fd2301eae0ec0a
tree98ace012c9edb94c3b3ca188b65501b9e695b73b
parent379688e35da0d34055fc3436aa1f4fd72de05a8c
Prevent a counter buffer overrun when numbering lines and when
processing 100 billion lines (or more) of input.

(LINE_COUNTER_BUF_LEN): Define to allow numbering as
many as 10^18 - 1 lines (the old limit was 10^11 - 1, and could
be exceeded without too much trouble). Use this symbol rather
than hard-coding the constant everywhere.  Rather than overruning
for input with more lines, mark the line number by putting a
`>' in the leftmost slot.
(next_line_num): Fixed (now academic) possible line buffer overrun.
Patch by Jan Nieuwenhuizen.
src/cat.c