1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:27:35 +00:00

Kernel: Prefer snprintf over sprintf

This commit is contained in:
Ben Wiederhake 2020-08-16 07:51:56 +02:00 committed by Andreas Kling
parent 0240baa42d
commit b6afe1f0ce
2 changed files with 6 additions and 6 deletions

View file

@ -38,7 +38,7 @@ SlavePTY::SlavePTY(MasterPTY& master, unsigned index)
, m_master(master)
, m_index(index)
{
sprintf(m_tty_name, "/dev/pts/%u", m_index);
snprintf(m_tty_name, sizeof(m_tty_name), "/dev/pts/%u", m_index);
auto process = Process::current();
set_uid(process->uid());
set_gid(process->gid());