Andreas Schwab wrote:
> But the sum can overflow, and since the involved types are
> unsigned this has defined (wrap-around) behaviour.
Thanks. I felt I must be overlooking something, but couldn't figure
out what.
> > Further, the Open Group says that 'od' should not produce an
> > error when '
Benno Schulenberg <[EMAIL PROTECTED]> writes:
> Hi,
>
> In src/od.c around line 1820 it says this:
>
> if (limit_bytes_to_format)
> {
> end_offset = n_bytes_to_skip + max_bytes_to_format;
> if (end_offset < n_bytes_to_skip)
> error (EXIT_FAILURE, 0, _("skip-bytes + read-b
Benno Schulenberg <[EMAIL PROTECTED]> writes:
> Since max_bytes_to_format cannot be negative, the second 'if' will
> never trigger, so the whole six lines are moot.
It can trigger if there is an arithmetic overflow.
> Further, the Open Group says that 'od' should not produce an error
> when '-
Hi,
In src/od.c around line 1820 it says this:
if (limit_bytes_to_format)
{
end_offset = n_bytes_to_skip + max_bytes_to_format;
if (end_offset < n_bytes_to_skip)
error (EXIT_FAILURE, 0, _("skip-bytes + read-bytes is too large"));
}
Since max_bytes_to_format cannot