commit c4e97f990dec479d65a98c354f162563e7e17396
parent cd618ecbcb392f6a3a4e40611b96b2ed0cd7e6a5
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 29 Jun 2026 22:04:05 +0200
size checks
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/util/secmod_cs.c b/src/util/secmod_cs.c
@@ -936,7 +936,7 @@ handle_batch_sign_request (struct TES_Client *client,
const struct TALER_CRYPTO_CsSignRequestMessage *sr = off;
uint16_t s = ntohs (sr->header.size);
- if (s > size)
+ if (s != sizeof (*sr))
{
failure = true;
bs = idx;
diff --git a/src/util/secmod_rsa.c b/src/util/secmod_rsa.c
@@ -762,7 +762,8 @@ handle_batch_sign_request (struct TES_Client *client,
const struct TALER_CRYPTO_SignRequest *sr = off;
uint16_t s = ntohs (sr->header.size);
- if (s > size)
+ if ( (s > size) ||
+ (s < sizeof (*sr)) )
{
failure = true;
bs = idx;