[PATCH] Fix crash

Simon Josefsson jas@extundo.com
Sat, 05 Jul 2003 07:24:05 +0200


Some self tests triggered the BUG() below; the logic seem to be
reversed.  I'm not sure if the FIXME referred to this, or something
else, so I didn't remove it.

--- md.c.~1.4.~	Sat Jul  5 04:50:58 2003
+++ md.c	Sat Jul  5 07:21:17 2003
@@ -909,7 +909,7 @@
 	 normal functions to do it */
       gcry_md_hd_t h;
       gpg_err_code_t err = md_open (&h, algo, 0, 0);
-      if(! err)
+      if (err)
 	/* FIXME?  */
 	BUG(); /* algo not available */
       md_write (h, (byte *) buffer, length);