diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-04-13 20:57:53 +0100 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-04-13 20:57:53 +0100 |
| commit | 265d039456dcc0931b6ef7d8c47d5fcd4908336f (patch) | |
| tree | fc9495429bea21f746055e50fb868bfe10e0e443 /src/common | |
| parent | chore(crates.io): bump version to test upload (diff) | |
| download | sl0ppij-265d039456dcc0931b6ef7d8c47d5fcd4908336f.tar.gz sl0ppij-265d039456dcc0931b6ef7d8c47d5fcd4908336f.tar.xz sl0ppij-265d039456dcc0931b6ef7d8c47d5fcd4908336f.zip | |
fix(perf): fixed a crash when `cat`ing large files and bounded memory usage
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/pty_bus.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/pty_bus.rs b/src/common/pty_bus.rs index 28ae62f2..2c132228 100644 --- a/src/common/pty_bus.rs +++ b/src/common/pty_bus.rs @@ -43,7 +43,7 @@ impl Stream for ReadFromPid { // indicates end of file Poll::Ready(None) } else { - let res = Some(read_buffer[..=*res].to_vec()); + let res = Some(read_buffer[..*res].to_vec()); Poll::Ready(res) } } |
