exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 0582a6b567eb09c559564f5cae1908584116cc38
parent 363e641f1734dca0c45c1b8542021baf147a5635
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 29 Mar 2020 04:03:06 +0200

fix auditor file parse problem

Diffstat:
Msrc/exchangedb/exchangedb_auditorkeys.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/exchangedb/exchangedb_auditorkeys.c b/src/exchangedb/exchangedb_auditorkeys.c @@ -151,7 +151,7 @@ auditor_iter (void *cls, return GNUNET_OK; } size -= sizeof (struct AuditorFileHeaderP); - if ( (size / dki_len) <= + if ( (size / dki_len) < (sizeof (struct TALER_DenominationKeyValidityPS) + sizeof (struct TALER_AuditorSignatureP)) ) { @@ -168,7 +168,8 @@ auditor_iter (void *cls, sigs = (const struct TALER_AuditorSignatureP *) &af[1]; dki = (const struct TALER_DenominationKeyValidityPS *) &sigs[dki_len]; auditor_url = (const char *) &dki[dki_len]; - if ('\0' != auditor_url[url_len - 1]) + if ( (0 == url_len) || + ('\0' != auditor_url[url_len - 1]) ) { GNUNET_break_op (0); GNUNET_log (GNUNET_ERROR_TYPE_WARNING,