toolkit: no thread panic in http_fetch, no casts, exact egress-proxy form
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
@@ -35,7 +35,10 @@ pub fn read_file(args: &ReadFileArgs) -> Outcome {
|
||||
};
|
||||
|
||||
let mut buf = Vec::new();
|
||||
let n = match file.take(MAX_READ as u64 + 1).read_to_end(&mut buf) {
|
||||
let n = match file
|
||||
.take(u64::try_from(MAX_READ).map_or(u64::MAX, |n| n.saturating_add(1)))
|
||||
.read_to_end(&mut buf)
|
||||
{
|
||||
Err(e) => return tool_err("read_file", path, &e.to_string()),
|
||||
Ok(n) => n,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user