diff --git a/crypto/replay/rdb.c b/crypto/replay/rdb.c index c84222fd0..5202a9ba9 100644 --- a/crypto/replay/rdb.c +++ b/crypto/replay/rdb.c @@ -130,8 +130,9 @@ rdb_add_index(rdb_t *rdb, uint32_t p_index) { err_status_t rdb_increment(rdb_t *rdb) { - if (rdb->window_start++ > 0x7fffffff) + if (rdb->window_start >= 0x7fffffff) return err_status_key_expired; + ++rdb->window_start; return err_status_ok; }