mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Fixed memory vulnerability in Windows version
This commit is contained in:
@@ -15,6 +15,8 @@ Released on 14/12/2020
|
||||
- Enhancements:
|
||||
- File explorer:
|
||||
- Fixed color mismatch in local explorer
|
||||
- Bugfix:
|
||||
- Fixed memory vulnerability in Windows version
|
||||
|
||||
## 0.1.2
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ impl Localhost {
|
||||
#[cfg(target_os = "windows")]
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
pub fn stat(&self, path: &Path) -> Result<FsEntry, HostError> {
|
||||
let attr: Metadata = match fs::metadata(path.clone()) {
|
||||
let attr: Metadata = match fs::metadata(path) {
|
||||
Ok(metadata) => metadata,
|
||||
Err(err) => return Err(HostError::new(HostErrorType::FileNotAccessible, Some(err))),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user