LCEMP RCE Fixes WIP

Based on d017bfc30a
This commit is contained in:
Loki Rautio
2026-03-09 04:46:37 -05:00
parent 0c4f459904
commit 164f034b0a
27 changed files with 223 additions and 80 deletions

View File

@@ -10,8 +10,19 @@
//offset - the offset in the buffer of the first byte to read.
//length - the maximum number of bytes to read from the buffer.
ByteArrayInputStream::ByteArrayInputStream(byteArray buf, unsigned int offset, unsigned int length)
: pos( offset ), count( min( offset+length, buf.length ) ), mark( offset )
: pos(offset), mark(offset)
{
if (offset > buf.length)
{
count = buf.length;
}
else if (length > buf.length - offset)
{
count = buf.length;
}
else
{
count = offset + length;
this->buf = buf;
}