{"record":{"id":"c78d3fbdb353e162","repo":"rustfs/rustfs","slug":"offset-out-of-bounds","errorCode":null,"errorMessage":"offset out of bounds","messagePattern":"offset out of bounds","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/rio/src/compress_index.rs","lineNumber":150,"sourceCode":"            compressed_offset,\n            uncompressed_offset,\n        });\n\n        self.total_compressed = compressed_offset;\n        self.total_uncompressed = uncompressed_offset;\n        Ok(())\n    }\n\n    pub fn find(&self, offset: i64) -> io::Result<(i64, i64)> {\n        if self.total_uncompressed < 0 {\n            return Err(io::Error::other(\"corrupt index\"));\n        }\n\n        let mut offset = offset;\n        if offset < 0 {\n            offset += self.total_uncompressed;\n            if offset < 0 {\n                return Err(io::Error::new(io::ErrorKind::UnexpectedEof, \"offset out of bounds\"));\n            }\n        }\n\n        if offset > self.total_uncompressed {\n            return Err(io::Error::new(io::ErrorKind::UnexpectedEof, \"offset out of bounds\"));\n        }\n\n        if self.info.is_empty() {\n            return Err(io::Error::new(io::ErrorKind::UnexpectedEof, \"empty index\"));\n        }\n\n        if self.info.len() > 200 {\n            let n = self\n                .info\n                .binary_search_by(|info| {\n                    if info.uncompressed_offset > offset {\n                        std::cmp::Ordering::Greater\n                    } else {","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/rustfs/rustfs/blob/9e6e02ea09c86bedf44c7bd64a74ea02a0cff1de/crates/rio/src/compress_index.rs#L132-L168","documentation":"Error \"offset out of bounds\" thrown in rustfs/rustfs.","triggerScenarios":"Thrown at crates/rio/src/compress_index.rs:150 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9e6e02ea09c86bedf44c7bd64a74ea02a0cff1de","analyzedAt":"2026-08-16T20:34:17.560Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}