aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-01-06 10:16:58 +0100
committerChristian Grothoff <christian@grothoff.org>2021-01-06 10:16:58 +0100
commitdc570d0c06cea200378d8b1030242081ebc4e356 (patch)
treefe8e108289df7441bc588cdb57837113a522d8af
parentadb48b61630a2d3ca0c0d67d564870ef39586eea (diff)
better error handling on configuration failures
-rw-r--r--src/util/crypto_helper_esign.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/crypto_helper_esign.c b/src/util/crypto_helper_esign.c
index 8b2b8216a..8d2a9dc58 100644
--- a/src/util/crypto_helper_esign.c
+++ b/src/util/crypto_helper_esign.c
@@ -62,6 +62,7 @@ struct TALER_CRYPTO_ExchangeSignHelper
* Have we reached the sync'ed state?
*/
bool synced;
+
};
@@ -239,6 +240,15 @@ TALER_CRYPTO_helper_esign_connect (
return NULL;
}
esh->template = template;
+ if (strlen (template) >= sizeof (esh->sa.sun_path))
+ {
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+ "PATHS",
+ "TALER_RUNTIME_DIR",
+ "path too long");
+ TALER_CRYPTO_helper_esign_disconnect (esh);
+ return NULL;
+ }
}
TALER_CRYPTO_helper_esign_poll (esh);
return esh;