[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] branch master updated (800c54b -> d550506)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] branch master updated (800c54b -> d550506) |
Date: |
Fri, 06 Oct 2017 21:31:14 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a change to branch master
in repository exchange.
from 800c54b do not potentially pass -1 to fcntl()
new 7f37c2a more return value checks on TALER_amount_get_zero
new 8f08e46 do not potentially pass -1 to fcntl()
new dc883f8 add assertion to be more defensive against buffer overflow
(cannot happen, but this better protects against future changes)
new d550506 BLOB is BYTEA in Postgres
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/auditor/taler-auditor.c | 25 +++++++++++++++----------
src/auditordb/plugin_auditordb_postgres.c | 4 ++--
src/exchange-lib/exchange_api_refresh_link.c | 1 +
src/exchange/taler-exchange-httpd.c | 7 ++++---
4 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index 1eff726..bf8bd97 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -1616,16 +1616,21 @@ check_transaction_history (const struct
TALER_CoinSpendPublicKeyP *coin_pub,
TALER_B2S (coin_pub));
GNUNET_assert (NULL != tl_head);
- TALER_amount_get_zero (currency,
- &expenditures);
- TALER_amount_get_zero (currency,
- &refunds);
- TALER_amount_get_zero (currency,
- merchant_gain);
- TALER_amount_get_zero (currency,
- merchant_fees);
- TALER_amount_get_zero (currency,
- &merchant_loss);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ &expenditures));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ &refunds));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ merchant_gain));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ merchant_fees));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ &merchant_loss));
/* Go over transaction history to compute totals; note that we do not
know the order, so instead of subtracting we compute positive
(deposit, melt) and negative (refund) values separately here,
diff --git a/src/auditordb/plugin_auditordb_postgres.c
b/src/auditordb/plugin_auditordb_postgres.c
index 5b7a048..b9da032 100644
--- a/src/auditordb/plugin_auditordb_postgres.c
+++ b/src/auditordb/plugin_auditordb_postgres.c
@@ -232,8 +232,8 @@ postgres_create_tables (void *cls)
"(master_pub BYTEA PRIMARY KEY CHECK
(LENGTH(master_pub)=32)"
",last_wire_reserve_in_serial_id INT8 NOT NULL
DEFAULT 0"
",last_wire_reserve_out_serial_id INT8 NOT NULL
DEFAULT 0"
- ",wire_in_off BLOB"
- ",wire_out_off BLOB"
+ ",wire_in_off BYTEA"
+ ",wire_out_off BYTEA"
")"),
/* Table with all of the customer reserves and their respective
balances that the auditor is aware of.
diff --git a/src/exchange-lib/exchange_api_refresh_link.c
b/src/exchange-lib/exchange_api_refresh_link.c
index 5b2286e..ca55668 100644
--- a/src/exchange-lib/exchange_api_refresh_link.c
+++ b/src/exchange-lib/exchange_api_refresh_link.c
@@ -235,6 +235,7 @@ parse_refresh_link_ok (struct
TALER_EXCHANGE_RefreshLinkHandle *rlh,
/* decode all coins */
for (i=0;i<json_array_size (jsona);i++)
{
+ GNUNET_assert (i + off_coin < num_coins);
if (GNUNET_OK !=
parse_refresh_link_coin (rlh,
json_array_get (jsona,
diff --git a/src/exchange/taler-exchange-httpd.c
b/src/exchange/taler-exchange-httpd.c
index 0f87408..0dd3f96 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -1060,9 +1060,10 @@ main (int argc,
fh_admin = -1;
}
flags |= FD_CLOEXEC;
- if (0 != fcntl (fh_admin,
- F_SETFD,
- flags))
+ if ( (-1 != fh_admin) &&
+ (0 != fcntl (fh_admin,
+ F_SETFD,
+ flags)) )
GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
"fcntl");
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-exchange] branch master updated (800c54b -> d550506),
gnunet <=