On 10/2/19 7:50 AM, Roland Illig wrote: > The current code says: > > next_line_no = line_no + page_incr; > if (next_line_no < line_no) > die (EXIT_FAILURE, 0, _("line number overflow")); > > Since intmax_t is a regular integer type, overflow invokes undefined > behavior and must therefore be checked using other means. Thanks for the bug report. I looked for similar problems involving integer-overflow diagnostics in coreutils and installed the attached patches. The second patch should fix the bug you mentioned.