Skip to content

Commit

Permalink
Fix select when verifying token with expiration
Browse files Browse the repository at this point in the history
Off-by-one error.

Fixes #114
Fixes OSPOOL-73
  • Loading branch information
djw8605 committed Apr 26, 2023
1 parent 5e0ca52 commit fcced75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scitokens_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class Validator {
auto result = verify_async(scitoken);
while (!result->m_done) {
auto timeout_val = result->get_timeout_val(expiry_time);
select(result->get_max_fd(), result->get_read_fd_set(),
select(result->get_max_fd()+1, result->get_read_fd_set(),
result->get_write_fd_set(), result->get_exc_fd_set(),
&timeout_val);
if (time(NULL) >= expiry_time) {
Expand Down

0 comments on commit fcced75

Please sign in to comment.