Comment 42 for bug 26650

Revision history for this message
In , Florian Weimer (fw) wrote : Re: Bug#342292: Fwd: Re: [vendor-sec] xpdf update - patch wrong?

* Martin Pitt:

> - For invalid (big) positive values of nObjs which, when multiplied with nObjs
> overflow an int, we have two cases:

But neither ISO C nor GNU C make any promises regarding this case.
Overflow is undefined, period.

You can pass -fwrapv to gcc if you want modulo arithmetic for ints.
In general, this decreases code quality, that's why it's not the
default.