aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/util/gnunet-ecc.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 9c0bdc1b1..9bfbd31c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1224,7 +1224,7 @@ AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious],
1224 1224
1225# should services be started by default when a peer starts? Some services may 1225# should services be started by default when a peer starts? Some services may
1226# choose to never start by default and it is upto the service/module developer to 1226# choose to never start by default and it is upto the service/module developer to
1227# decide it by having "AUTOSTART = NO" instead of "AUTOSTART = @AUTOSTART" in 1227# decide it by having "AUTOSTART = NO" instead of "AUTOSTART = @AUTOSTART@" in
1228# the service/module's conf.in file. 1228# the service/module's conf.in file.
1229AUTOSTART="YES" 1229AUTOSTART="YES"
1230AC_MSG_CHECKING(whether to auto-start peer's services by default) 1230AC_MSG_CHECKING(whether to auto-start peer's services by default)
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c
index 28355a9d8..f725e4ff3 100644
--- a/src/util/gnunet-ecc.c
+++ b/src/util/gnunet-ecc.c
@@ -84,11 +84,12 @@ create_keys (const char *fn, const char *prefix)
84 if (NULL != prefix) 84 if (NULL != prefix)
85 { 85 {
86 strncpy (vanity, prefix, KEY_STR_LEN); 86 strncpy (vanity, prefix, KEY_STR_LEN);
87 len = strlen (vanity); 87 len = GNUNET_MIN (strlen (prefix), KEY_STR_LEN);
88 n = len * 5 / 8; 88 n = len * 5 / 8;
89 rest = len * 5 % 8; 89 rest = len * 5 % 8;
90 90
91 memset (&vanity[len], '0', KEY_STR_LEN - len); 91 memset (&vanity[len], '0', KEY_STR_LEN - len);
92 vanity[KEY_STR_LEN] = '\0';
92 GNUNET_assert (GNUNET_OK == 93 GNUNET_assert (GNUNET_OK ==
93 GNUNET_CRYPTO_eddsa_public_key_from_string (vanity, 94 GNUNET_CRYPTO_eddsa_public_key_from_string (vanity,
94 KEY_STR_LEN, 95 KEY_STR_LEN,