gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: EC instead of SEGV


From: gnunet
Subject: [taler-exchange] branch master updated: EC instead of SEGV
Date: Thu, 25 Aug 2022 20:32:52 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 5e206e7c EC instead of SEGV
5e206e7c is described below

commit 5e206e7c3023f5b3803c286b7d44ae50f542bd0d
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Aug 25 20:32:50 2022 +0200

    EC instead of SEGV
---
 contrib/gana            |  2 +-
 src/bank-lib/fakebank.c | 28 ++++++++++++++++------------
 2 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/contrib/gana b/contrib/gana
index a8ec467f..5f6a1413 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit a8ec467f79aab32f671c146ca9cffb812920e1a2
+Subproject commit 5f6a1413a6053d1999064768188f1671eb015897
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 4ad1be92..0123f7c5 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -2864,16 +2864,6 @@ do_post_withdrawal (struct TALER_FAKEBANK_Handle *h,
                                        "exchange account changed");
   }
   wo->exchange_account = credit_account;
-  if (NULL == wo->exchange_account)
-  {
-    GNUNET_assert (0 ==
-                   pthread_mutex_unlock (&h->big_lock));
-    return TALER_MHD_reply_with_error (connection,
-                                       MHD_HTTP_NOT_FOUND,
-                                       TALER_EC_BANK_UNKNOWN_ACCOUNT,
-                                       exchange_payto_uri);
-  }
-
   wo->reserve_pub = *reserve_pub;
   wo->selection_done = true;
   GNUNET_assert (0 ==
@@ -3606,6 +3596,15 @@ access_withdrawals_confirm (struct TALER_FAKEBANK_Handle 
*h,
                                        TALER_EC_BANK_TRANSACTION_NOT_FOUND,
                                        account_name);
   }
+  if (NULL == wo->exchange_account)
+  {
+    GNUNET_assert (0 ==
+                   pthread_mutex_unlock (&h->big_lock));
+    return TALER_MHD_reply_with_error (connection,
+                                       MHD_HTTP_BAD_REQUEST,
+                                       
TALER_EC_BANK_POST_WITHDRAWAL_OPERATION_REQUIRED,
+                                       NULL);
+  }
   if (wo->aborted)
   {
     GNUNET_assert (0 ==
@@ -4089,8 +4088,13 @@ TALER_FAKEBANK_start2 (uint16_t port,
 {
   struct TALER_Amount zero;
 
-  TALER_amount_set_zero (currency,
-                         &zero);
+  if (GNUNET_OK !=
+      TALER_amount_set_zero (currency,
+                             &zero))
+  {
+    GNUNET_break (0);
+    return NULL;
+  }
   return TALER_FAKEBANK_start3 ("localhost",
                                 port,
                                 NULL,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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