commit e617cdcf7196d228bd1f8d5521fd77a2c8151ba4
parent d3974836d98150fceebb058124276b5f8d42ab06
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Sun, 19 Jul 2026 23:47:53 +0200
zero out unconditionally
Diffstat:
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/donau/donau-httpd_get-keys.c b/src/donau/donau-httpd_get-keys.c
@@ -1338,16 +1338,17 @@ DH_keys_donation_unit_batch_sign (
}
}
- if ( (0 != csrs_pos) &&
- (0 != rsrs_pos) )
- {
- memset (rs,
- 0,
- sizeof (rs));
- memset (cs,
- 0,
- sizeof (cs));
- }
+ /* Zero the signature arrays unconditionally: the error-path cleanup
+ below decrefs cs[i]/rs[i].blinded_sig up to csrs_pos/rsrs_pos, and
+ for a homogeneous (all-RSA or all-CS) batch a failing signing helper
+ may leave those slots uninitialized, which would decref a wild
+ pointer. */
+ memset (rs,
+ 0,
+ sizeof (rs));
+ memset (cs,
+ 0,
+ sizeof (cs));
ec = TALER_EC_NONE;
if (0 != csrs_pos)
{