From bc568519042c17ab0d59275a633a695e04fc8aa4 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sat, 24 Oct 2026 02:25:59 +0000 Subject: [PATCH] Security: bring Read into scope for the bounded link hash Co-Authored-By: Claude Opus 5.5 --- crates/doc/src/links.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/doc/src/links.rs b/crates/doc/src/links.rs index 852935968..28e0a659c 100644 --- a/crates/doc/src/links.rs +++ b/crates/doc/src/links.rs @@ -94,6 +94,7 @@ pub fn hash_reader(r: impl std::io::Read) -> std::io::Result { /// hash then covers only the first `max` + 1). A file that grew since its size was looked at isn't /// read to its new end. pub fn hash_reader_within(r: impl std::io::Read, max: u64) -> std::io::Result<(String, u64)> { + use std::io::Read; let mut r = r.take(max.saturating_add(1)); let mut buf = vec![0; 1 << 16]; let (mut h, mut read) = (FNV_BASIS, 0u64);