diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-01-10 17:06:38 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-01-10 17:06:38 -0800 |
commit | 8b9dd2d1a9a86eb2bca7b67cb6bd4b707d63c042 (patch) | |
tree | dd040d1ce0943c5530c9e905863211001ee131ec /subx/060write-stream.subx | |
parent | f7f0d6318231ff081ed6ff2ef30d8e1823e11c70 (diff) | |
download | mu-8b9dd2d1a9a86eb2bca7b67cb6bd4b707d63c042.tar.gz |
4916
In the process of building slice primitives I found an out-of-bounds access in write-byte.
Diffstat (limited to 'subx/060write-stream.subx')
-rw-r--r-- | subx/060write-stream.subx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subx/060write-stream.subx b/subx/060write-stream.subx index a9859ec9..f112dee9 100644 --- a/subx/060write-stream.subx +++ b/subx/060write-stream.subx @@ -96,7 +96,7 @@ _write-stream: # fd : int, s : (address stream) -> <void> 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 7/r32/EDI 4/disp8 . # copy *(ESI+4) to EDI # EDX = s->write 8b/copy 0/mod/indirect 6/rm32/ESI . . . 2/r32/EDX . . # copy *ESI to EDX - # syscall(write, fd, &s->data[s->read], s->write-s->read) + # syscall(write, fd, &s->data[s->read], s->write - s->read) # . . fd : EBX 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 3/r32/EBX 8/disp8 . # copy *(EBP+8) to EBX # . . data : ECX = &s->data[s->read] |