summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
diff options
context:
space:
mode:
authorActs1631 <acts1631kjv@proton.me>2026-08-04 11:47:51 -0400
committerActs1631 <acts1631kjv@proton.me>2026-10-02 14:14:45 -0400
commit1eca2ca31c4e964be8f5e38bf01d786702737252 (patch)
tree4d687705259de23b95ae4ce71a7aec15657ea6dd /Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
parentbb3558a70ecb767ca59c23bbe06fb6bcb78cd3bd (diff)
NetPlay: reject oversized input buffer messages
A NetPlay host could send an arbitrary buffer size to a client. The client then tried to allocate input states until it reached that value. Limit buffer sizes to the existing user-interface maximum. Invalid peer values are ignored.
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp')
-rw-r--r--Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
index 733ba76bd1..c4ebae425c 100644
--- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
+++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
@@ -33,6 +33,7 @@
#include "Common/Logging/Log.h"
#include "Common/TraversalClient.h"
#include "Core/NetPlayCommon.h"
+#include "Core/NetPlayProto.h"
#include "Core/Boot/Boot.h"
#include "Core/Config/GraphicsSettings.h"
@@ -130,6 +131,7 @@ void NetPlayDialog::CreateMainLayout()
m_game_button = new QPushButton;
m_start_button = new QPushButton(tr("Start"));
m_buffer_size_box = new QSpinBox;
+ m_buffer_size_box->setMaximum(NetPlay::MAX_TARGET_PAD_BUFFER_SIZE);
m_buffer_label = new QLabel(tr("Buffer:"));
m_quit_button = new QPushButton(tr("Quit"));
m_splitter = new QSplitter(Qt::Horizontal);