[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] 02/03: fix uuids in policy struct
From: |
gnunet |
Subject: |
[taler-anastasis] 02/03: fix uuids in policy struct |
Date: |
Thu, 07 May 2020 19:10:07 +0200 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis.
commit 8ece31b6ef26e2549725ed3572c9b5ed900d792e
Author: Dennis Neufeld <address@hidden>
AuthorDate: Thu May 7 16:53:15 2020 +0000
fix uuids in policy struct
---
src/lib/anastasis.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index 7af886e..0bf6b81 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -1079,10 +1079,11 @@ ANASTASIS_policy_create (struct ANASTASIS_Truth
*truths[],
GNUNET_memcpy (p->truths,
truths,
truths_len * sizeof (struct ANASTASIS_Truth *));
-
- p->uuids = uuids;
+ p->uuids = GNUNET_malloc (truths_len * sizeof (uuid_t *));
+ GNUNET_memcpy (p->uuids,
+ uuids,
+ truths_len * sizeof (uuid_t *));
p->uuids_length = truths_len;
- // p->truths = truths;
GNUNET_assert (NULL != p->uuids);
GNUNET_assert (p->uuids_length == truths_len);
@@ -1480,12 +1481,10 @@ ANASTASIS_secret_share (const json_t *id_data,
dec_policies = json_array ();
esc_methods = json_array ();
- unsigned int all_uuids_length = 0;
int index_pss = 0;
for (unsigned int k = 0; k < policies_len; k++ )
{
policy = policies[k];
- all_uuids_length += policy->uuids_length;
json_t *dec_policy = json_pack ("{s:o," /* encrypted master key */
" s:o," /* policy uuids */
" s:i}",/* policy uuids length */
@@ -1497,7 +1496,7 @@ ANASTASIS_secret_share (const json_t *id_data,
policy->
uuids_length
* sizeof(uuid_t)),
- "uuid_length", &policy->uuids_length);
+ "uuid_length", policy->uuids_length);
GNUNET_assert (NULL != dec_policy);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"dec policy json before upload 0: %s\n",
--
To stop receiving notification emails like this one, please contact
address@hidden.