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
c1281900
Commit
c1281900
authored
Sep 11, 2017
by
antirez
Browse files
Streams: fix handleClientsBlockedOnKeys() access to invalid ID.
parent
6468cb2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/blocked.c
View file @
c1281900
...
@@ -311,9 +311,12 @@ void handleClientsBlockedOnKeys(void) {
...
@@ -311,9 +311,12 @@ void handleClientsBlockedOnKeys(void) {
(
s
->
last_id
.
ms
==
gt
->
ms
&&
(
s
->
last_id
.
ms
==
gt
->
ms
&&
s
->
last_id
.
seq
>
gt
->
seq
))
s
->
last_id
.
seq
>
gt
->
seq
))
{
{
unblockClient
(
receiver
);
streamID
start
=
*
gt
;
streamID
start
=
*
gt
;
start
.
seq
++
;
/* Can't overflow, it's an uint64_t */
start
.
seq
++
;
/* Can't overflow, it's an uint64_t */
/* Note that after we unblock the client, 'gt'
* is no longer valid, so we must do it after
* we copied the ID into the 'start' variable. */
unblockClient
(
receiver
);
/* Emit the two elements sub-array consisting of
/* Emit the two elements sub-array consisting of
* the name of the stream and the data we
* the name of the stream and the data we
...
...
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