commit 656eaab60f20fb3136bcc268a390674404c44908
parent ae5ecabc0846d84d2a44d7f534f42c7fe84df03d
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 2 Feb 2026 09:57:05 +0100
avoid NPE
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/util/secmod_cs.c b/src/util/secmod_cs.c
@@ -1658,6 +1658,8 @@ get_anchor_end (void)
= GNUNET_TIME_relative_to_absolute (lookahead_sign);
uint64_t mod;
+ if (GNUNET_TIME_relative_is_zero (md))
+ return GNUNET_TIME_UNIT_ZERO_TS;
/* Round up 'end' to a multiple of 'md' */
mod = end.abs_value_us % md.rel_value_us;
end.abs_value_us -= mod;
diff --git a/src/util/secmod_rsa.c b/src/util/secmod_rsa.c
@@ -1392,6 +1392,8 @@ get_anchor_end (void)
= GNUNET_TIME_relative_to_absolute (lookahead_sign);
uint64_t mod;
+ if (GNUNET_TIME_relative_is_zero (md))
+ return GNUNET_TIME_UNIT_ZERO_TS;
/* Round up 'end' to a multiple of 'md' */
mod = end.abs_value_us % md.rel_value_us;
end.abs_value_us -= mod;