Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tarot
tarot
Commits
8118e273
Commit
8118e273
authored
Oct 12, 2019
by
Vivien Kraus
Browse files
Protect the event for over-reading
parent
8af08ad0
Pipeline
#174815
passed with stages
in 31 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/libtarot/event/tarot/game_event_private_impl.h
View file @
8118e273
...
...
@@ -413,6 +413,10 @@ event_get_data (const TarotGameEvent * event, size_t *n, size_t start,
size_t
max
,
TarotCard
*
cards
)
{
*
n
=
event
->
n
;
if
(
max
>
event
->
n
)
{
max
=
event
->
n
;
}
memcpy
(
cards
,
event
->
data
+
start
,
max
*
sizeof
(
*
cards
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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