diff --git a/fs/tfs_server.c b/fs/tfs_server.c index 57e847b..01e3809 100644 --- a/fs/tfs_server.c +++ b/fs/tfs_server.c @@ -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;