Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YGOPRO-520DIY
ygopro
Commits
0087c9b9
Commit
0087c9b9
authored
Mar 16, 2021
by
nanahira
Committed by
GitHub
Mar 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix CVE-2020-24213 (#2327)
parent
01bb8e67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
gframe/single_duel.cpp
gframe/single_duel.cpp
+2
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+2
-1
No files found.
gframe/single_duel.cpp
View file @
0087c9b9
...
...
@@ -288,7 +288,8 @@ void SingleDuel::UpdateDeck(DuelPlayer* dp, void* pdata, unsigned int len) {
int
mainc
=
BufferIO
::
ReadInt32
(
deckbuf
);
int
sidec
=
BufferIO
::
ReadInt32
(
deckbuf
);
// verify data
if
((
unsigned
)
mainc
+
(
unsigned
)
sidec
>
(
len
-
8
)
/
4
)
{
const
unsigned
int
possibleMaxLength
=
(
len
-
8
)
/
4
;
if
((
unsigned
)
mainc
>
possibleMaxLength
||
(
unsigned
)
sidec
>
possibleMaxLength
||
(
unsigned
)
mainc
+
(
unsigned
)
sidec
>
possibleMaxLength
)
{
STOC_ErrorMsg
scem
;
scem
.
msg
=
ERRMSG_DECKERROR
;
scem
.
code
=
0
;
...
...
gframe/tag_duel.cpp
View file @
0087c9b9
...
...
@@ -263,7 +263,8 @@ void TagDuel::UpdateDeck(DuelPlayer* dp, void* pdata, unsigned int len) {
int
mainc
=
BufferIO
::
ReadInt32
(
deckbuf
);
int
sidec
=
BufferIO
::
ReadInt32
(
deckbuf
);
// verify data
if
((
unsigned
)
mainc
+
(
unsigned
)
sidec
>
(
len
-
8
)
/
4
)
{
const
unsigned
int
possibleMaxLength
=
(
len
-
8
)
/
4
;
if
((
unsigned
)
mainc
>
possibleMaxLength
||
(
unsigned
)
sidec
>
possibleMaxLength
||
(
unsigned
)
mainc
+
(
unsigned
)
sidec
>
possibleMaxLength
)
{
STOC_ErrorMsg
scem
;
scem
.
msg
=
ERRMSG_DECKERROR
;
scem
.
code
=
0
;
...
...
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