[OTR-dev] Offline ICQ message with OTR crash, I think

Ian Goldberg ian at cypherpunks.ca
Thu Feb 9 10:18:58 EST 2006


On Thu, Feb 09, 2006 at 02:59:21AM -0500, Evan Schoenberg wrote:
> I've seen this backtrace in the Adium crash reporter a couple times...
> 
> 0   Libgaim                        	0x04a62ba8 _gcry_mpi_free   32
> 1   Libgaim                        	0x04a5da58  
> otrl_auth_handle_v1_key_exchange   1320

Good catch.  Try this patch:

Index: auth.c
===================================================================
RCS file: /cvsroot/otr/libotr/src/auth.c,v
retrieving revision 1.3
diff -u -r1.3 auth.c
--- auth.c      30 Oct 2005 21:01:15 -0000      1.3
+++ auth.c      9 Feb 2006 15:14:36 -0000
@@ -1188,7 +1188,7 @@
     unsigned char *buf = NULL, *bufp = NULL;
     unsigned char *fingerprintstart, *fingerprintend;
     unsigned char fingerprintbuf[20], hashbuf[20];
-    gcry_mpi_t p, q, g, y, received_pub;
+    gcry_mpi_t p, q, g, y, received_pub = NULL;
     gcry_sexp_t pubs = NULL;
     size_t buflen, lenp;
     unsigned char received_reply;


In the event of certain error conditions, received_pub was being
gcry_mpi_release()d before it was initialized.

Oops.  *covers face in shame*  ;-)

I'm not saying this is exactly the problem you're seeing, but it seems
pretty likely.

Thanks for the report!  Fixed in CVS.

   - Ian



More information about the OTR-dev mailing list