mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
Kernel: Prefer snprintf over sprintf
This commit is contained in:
parent
0240baa42d
commit
b6afe1f0ce
Notes:
sideshowbarker
2024-07-19 03:17:10 +09:00
Author: https://github.com/BenWiederhake
Commit: b6afe1f0ce
Pull-request: https://github.com/SerenityOS/serenity/pull/3263
2 changed files with 6 additions and 6 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue