-more minor bugfixes

This commit is contained in:
Christian Grothoff 2022-06-07 17:04:23 +02:00
parent 446761b602
commit 982b60c93c
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 17 additions and 0 deletions

View File

@ -824,6 +824,8 @@ cs_update_client_keys (struct TES_Client *client)
memcpy (&buf[obs],
&pn,
sizeof (pn));
GNUNET_assert (obs + sizeof (pn)
> obs);
obs += sizeof (pn);
}
else
@ -831,6 +833,8 @@ cs_update_client_keys (struct TES_Client *client)
memcpy (&buf[obs],
key->an,
ntohs (key->an->header.size));
GNUNET_assert (obs + ntohs (key->an->header.size)
> obs);
obs += ntohs (key->an->header.size);
}
}

View File

@ -743,6 +743,11 @@ handle_batch_sign_request (struct TES_Client *client,
struct BatchJob jobs[bs];
bool failure = false;
if (bs > TALER_MAX_FRESH_COINS)
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
while ( (bs > 0) &&
(size > sizeof (struct TALER_CRYPTO_SignRequest)) )
{
@ -1087,6 +1092,8 @@ rsa_client_init (struct TES_Client *client)
NULL != dk;
dk = dk->next)
{
GNUNET_assert (obs + ntohs (dk->an->header.size)
> obs);
obs += ntohs (dk->an->header.size);
}
}
@ -1103,6 +1110,8 @@ rsa_client_init (struct TES_Client *client)
memcpy (&buf[obs],
dk->an,
ntohs (dk->an->header.size));
GNUNET_assert (obs + ntohs (dk->an->header.size)
> obs);
obs += ntohs (dk->an->header.size);
}
}
@ -1202,6 +1211,8 @@ rsa_update_client_keys (struct TES_Client *client)
memcpy (&buf[obs],
&pn,
sizeof (pn));
GNUNET_assert (obs + sizeof (pn)
> obs);
obs += sizeof (pn);
}
else
@ -1209,6 +1220,8 @@ rsa_update_client_keys (struct TES_Client *client)
memcpy (&buf[obs],
key->an,
ntohs (key->an->header.size));
GNUNET_assert (obs + ntohs (key->an->header.size)
> obs);
obs += ntohs (key->an->header.size);
}
}