diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2020-08-16 07:51:56 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-22 20:55:10 +0200 |
commit | b6afe1f0cecd1025afcc99771acc9580b4079691 (patch) | |
tree | addf5f8c5966bd59e97c237ff601f5b35de117d2 /Kernel/TTY/SlavePTY.cpp | |
parent | 0240baa42de554a7eb103020c2d53373d3468b31 (diff) | |
download | serenity-b6afe1f0cecd1025afcc99771acc9580b4079691.zip |
Kernel: Prefer snprintf over sprintf
Diffstat (limited to 'Kernel/TTY/SlavePTY.cpp')
-rw-r--r-- | Kernel/TTY/SlavePTY.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/TTY/SlavePTY.cpp b/Kernel/TTY/SlavePTY.cpp index f4ba079188..dd18963596 100644 --- a/Kernel/TTY/SlavePTY.cpp +++ b/Kernel/TTY/SlavePTY.cpp @@ -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()); |