[PATCH] Replace division by zero with assert failure
Andre Amorim
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
>
> void
> _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.
>
>
> Salam-Shalom,
>
> Werner
>
> --
> Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
>
>
> _______________________________________________
> Gcrypt-devel mailing list
> Gcrypt-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20131108/a98257ad/attachment.html>
More information about the Gcrypt-devel
mailing list