Message-ID: <email address hidden> Date: Fri, 09 Dec 2005 11:53:58 +0100 From: Florian Weimer <email address hidden> To: Martin Pitt <email address hidden> Cc: Frank =?iso-8859-1?Q?K=FCster?= <email address hidden>, <email address hidden> Subject: 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.
Message-ID: <email address hidden> 1?Q?K=FCster? = <email address hidden>,
Date: Fri, 09 Dec 2005 11:53:58 +0100
From: Florian Weimer <email address hidden>
To: Martin Pitt <email address hidden>
Cc: Frank =?iso-8859-
<email address hidden>
Subject: 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.