fix(security): resolve rebase conflicts and provider regressions
This commit is contained in:
parent
5d131a8903
commit
0087bcc496
4 changed files with 23 additions and 44 deletions
|
|
@ -94,14 +94,16 @@ impl Tool for HardwareMemoryReadTool {
|
|||
.get("address")
|
||||
.and_then(|v| v.as_str())
|
||||
.unwrap_or("0x20000000");
|
||||
let address = parse_hex_address(address_str).unwrap_or(NUCLEO_RAM_BASE);
|
||||
let _address = parse_hex_address(address_str).unwrap_or(NUCLEO_RAM_BASE);
|
||||
|
||||
let length = args.get("length").and_then(|v| v.as_u64()).unwrap_or(128) as usize;
|
||||
let length = length.min(256).max(1);
|
||||
let requested_length = args.get("length").and_then(|v| v.as_u64()).unwrap_or(128);
|
||||
let _length = usize::try_from(requested_length)
|
||||
.unwrap_or(256)
|
||||
.clamp(1, 256);
|
||||
|
||||
#[cfg(feature = "probe")]
|
||||
{
|
||||
match probe_read_memory(chip.unwrap(), address, length) {
|
||||
match probe_read_memory(chip.unwrap(), _address, _length) {
|
||||
Ok(output) => {
|
||||
return Ok(ToolResult {
|
||||
success: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue