gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r24046 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r24046 - gnunet/src/util
Date: Thu, 27 Sep 2012 14:54:34 +0200

Author: grothoff
Date: 2012-09-27 14:54:34 +0200 (Thu, 27 Sep 2012)
New Revision: 24046

Modified:
   gnunet/src/util/gnunet-rsa.c
Log:
-check return value

Modified: gnunet/src/util/gnunet-rsa.c
===================================================================
--- gnunet/src/util/gnunet-rsa.c        2012-09-27 12:53:36 UTC (rev 24045)
+++ gnunet/src/util/gnunet-rsa.c        2012-09-27 12:54:34 UTC (rev 24046)
@@ -126,7 +126,11 @@
     GNUNET_CRYPTO_hash (&make_keys, sizeof (make_keys), &h2);
     GNUNET_CRYPTO_hash (&hc, sizeof (hc), &h3);
     GNUNET_CRYPTO_hash_xor (&h2, &h3, &hc);
-    pk = GNUNET_CRYPTO_rsa_key_create_from_hash (&hc);
+    if (NULL == (pk = GNUNET_CRYPTO_rsa_key_create_from_hash (&hc))
+    {  
+       GNUNET_break (0);
+       break;
+    }
     enc = GNUNET_CRYPTO_rsa_encode_key (pk);
     if (htons (enc->len) != fwrite (enc, 1, htons (enc->len), f))
       {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]