diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-03-29 04:03:06 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-03-29 04:03:06 +0200 |
commit | 0582a6b567eb09c559564f5cae1908584116cc38 (patch) | |
tree | 95265c8ba4460e847431519ba41f0fe2eea36f8b | |
parent | 363e641f1734dca0c45c1b8542021baf147a5635 (diff) |
fix auditor file parse problem
-rw-r--r-- | src/exchangedb/exchangedb_auditorkeys.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exchangedb/exchangedb_auditorkeys.c b/src/exchangedb/exchangedb_auditorkeys.c index 4adf89811..d285fc5e6 100644 --- 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, |