[PATCH] Replace division by zero with assert failure
andre at amorim.me
Fri Nov 8 17:27:10 CET 2013
off: //Its always blows my mind since I think in terms of circuits, anyways
let me back to my fpga board
Gnupg key: 02375205
Fingerprint: F7CD D181 943B 0453 8668 AF16 84E9 7565 0237 5205
On 8 November 2013 16:12, Werner Koch <wk at gnupg.org> wrote:
> On Fri, 8 Nov 2013 16:58, phcoder at gmail.com said:
> > C specification says that division by zero is undefined and may not
> > provoke a signal. So it would be more appropriate to use gcry_assert
> Actually this changed some time ago. What we now do is to call
> _gcry_divide_by_zero (void)
> gpg_err_set_errno (EDOM);
> _gcry_fatal_error (gpg_err_code_from_errno (errno), "divide by zero");
> I am not sure whether it has or should be backported to 1.5.
> Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
> Gcrypt-devel mailing list
> Gcrypt-devel at gnupg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gcrypt-devel