diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-11-16 20:54:49 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-17 17:07:39 +0100 |
commit | 4c343c5f26a195ae1bb34646d403281472260c7f (patch) | |
tree | e17ad7d34b627ae064b6a1e3584a84f9148064a1 /Libraries | |
parent | b1fb8e3741e680eab08ffaa3f49ed417b84c0fab (diff) | |
download | serenity-4c343c5f26a195ae1bb34646d403281472260c7f.zip |
AK: Fix OOB access in DuplexMemoryStream::offset_of()
This fixes an OOB access when the last read/written chunk is empty (as we _just_
started on a new chunk).
Also adds a test case to TestMemoryStream.
Found via human fuzzing in the shell:
```sh
for $(cat /dev/urandom) {
clear
match $it {
?* as (x) {
echo $x
sleep 1
}
}
}
```
would assert at some point.
Diffstat (limited to 'Libraries')
0 files changed, 0 insertions, 0 deletions