Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
b33a12ea
Unverified
Commit
b33a12ea
authored
Dec 14, 2024
by
shiyu1994
Committed by
GitHub
Dec 13, 2024
Browse files
[fix] resolve potential attack in linker connection building (#6752)
parent
53e0ddf7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/network/linkers_socket.cpp
src/network/linkers_socket.cpp
+3
-0
No files found.
src/network/linkers_socket.cpp
View file @
b33a12ea
...
...
@@ -157,6 +157,9 @@ void Linkers::ListenThread(int incoming_cnt) {
}
int
*
ptr_in_rank
=
reinterpret_cast
<
int
*>
(
buffer
);
int
in_rank
=
*
ptr_in_rank
;
if
(
in_rank
<
0
||
in_rank
>=
num_machines_
)
{
Log
::
Fatal
(
"Invalid rank %d found during initialization of linkers. The world size is %d."
,
in_rank
,
num_machines_
);
}
// add new socket
SetLinker
(
in_rank
,
handler
);
++
connected_cnt
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment