Subject: bug#37585: Undefined behavior in nl, print_lineno

From: Roland Illig <[email-masked]>
Date: Wed, 2 Oct 2019 16:50:53 +0200

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.