commit c8c570ffdeac73dfbe6b37fb924d826584e5e1c9 parent d9d015cc7f5cdaab628b0f4ae5c88df99c22760d Author: Christian Grothoff <grothoff@gnunet.org> Date: Sun, 19 Jul 2026 22:55:38 +0200 prevent integer underflow if address is NULL Diffstat:
| M | src/challengerdb/challenger_do_challenge_set_address_and_pin.sql | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/challengerdb/challenger_do_challenge_set_address_and_pin.sql b/src/challengerdb/challenger_do_challenge_set_address_and_pin.sql @@ -99,7 +99,8 @@ IF ( (my_status.address IS NULL) OR (in_address != my_status.address) ) THEN -- we are changing the address, update counters - my_status.address_attempts_left = my_status.address_attempts_left - 1; + my_status.address_attempts_left + = GREATEST(0,my_status.address_attempts_left - 1); my_status.address = in_address; my_status.pin_transmissions_left = 3; my_status.last_tx_time = 0;