Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
check session bounds correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
RafDevX committed Feb 4, 2022
1 parent 5daaf64 commit c8e0ef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/tfs_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int take_session() {
}

int free_session(int session_id) {
if (session_id < 0 || session_id > MAX_SESSION_COUNT)
if (session_id < 0 || session_id >= MAX_SESSION_COUNT)
return -1;
lock_mutex(&free_sessions_lock);
free_sessions[session_id] = FREE;
Expand Down

0 comments on commit c8e0ef6

Please sign in to comment.