1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

Kernel: Make syscalls that take a buffer size use ssize_t instead of size_t.

Dealing with the unsigned overflow propagation here just seems unreasonably
error prone. Let's limit ourselves to 2GB buffer sizes instead.
This commit is contained in:
Andreas Kling 2019-02-25 21:19:57 +01:00
parent 5af4e622b9
commit beda478821
40 changed files with 144 additions and 136 deletions

View file

@ -499,10 +499,10 @@ void VirtualConsole::on_sysconsole_receive(byte ch)
m_current_attribute = old_attribute;
}
ssize_t VirtualConsole::on_tty_write(const byte* data, size_t size)
ssize_t VirtualConsole::on_tty_write(const byte* data, ssize_t size)
{
InterruptDisabler disabler;
for (size_t i = 0; i < size; ++i)
for (ssize_t i = 0; i < size; ++i)
on_char(data[i]);
return size;
}