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
1e0e1685
Commit
1e0e1685
authored
Jan 16, 2018
by
qinchao
Browse files
fix assert problem in ZIP_DECODE_PREVLENSIZE
, see issue:
https://github.com/antirez/redis/issues/4587
parent
0cc43760
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ziplist.c
View file @
1e0e1685
...
@@ -440,7 +440,7 @@ unsigned int zipStorePrevEntryLength(unsigned char *p, unsigned int len) {
...
@@ -440,7 +440,7 @@ unsigned int zipStorePrevEntryLength(unsigned char *p, unsigned int len) {
if ((prevlensize) == 1) { \
if ((prevlensize) == 1) { \
(prevlen) = (ptr)[0]; \
(prevlen) = (ptr)[0]; \
} else if ((prevlensize) == 5) { \
} else if ((prevlensize) == 5) { \
assert(sizeof((prevlen
size
)) == 4); \
assert(sizeof((prevlen)) == 4); \
memcpy(&(prevlen), ((char*)(ptr)) + 1, 4); \
memcpy(&(prevlen), ((char*)(ptr)) + 1, 4); \
memrev32ifbe(&prevlen); \
memrev32ifbe(&prevlen); \
} \
} \
...
...
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