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
ruanhaishen
redis
Commits
7e24e219
Unverified
Commit
7e24e219
authored
Dec 05, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Dec 05, 2019
Browse files
Merge pull request #6645 from eliblight/fix-memcpy
Fix memcpy of id from key to be slightly safer.
parents
2271cf03
08c3fe80
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tracking.c
View file @
7e24e219
...
...
@@ -164,7 +164,7 @@ void trackingInvalidateSlot(uint64_t slot) {
raxSeek
(
&
ri
,
"^"
,
NULL
,
0
);
while
(
raxNext
(
&
ri
))
{
uint64_t
id
;
memcpy
(
&
id
,
ri
.
key
,
ri
.
key_len
);
memcpy
(
&
id
,
ri
.
key
,
sizeof
(
id
)
);
client
*
c
=
lookupClientByID
(
id
);
if
(
c
==
NULL
||
!
(
c
->
flags
&
CLIENT_TRACKING
))
continue
;
sendTrackingMessage
(
c
,
slot
);
...
...
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