summaryrefslogtreecommitdiff
path: root/Kernel/TTY/SlavePTY.cpp
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-08-16 07:51:56 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-22 20:55:10 +0200
commitb6afe1f0cecd1025afcc99771acc9580b4079691 (patch)
treeaddf5f8c5966bd59e97c237ff601f5b35de117d2 /Kernel/TTY/SlavePTY.cpp
parent0240baa42de554a7eb103020c2d53373d3468b31 (diff)
downloadserenity-b6afe1f0cecd1025afcc99771acc9580b4079691.zip
Kernel: Prefer snprintf over sprintf
Diffstat (limited to 'Kernel/TTY/SlavePTY.cpp')
-rw-r--r--Kernel/TTY/SlavePTY.cpp2
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());