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
ce7c4726
Commit
ce7c4726
authored
May 20, 2014
by
Salvatore Sanfilippo
Browse files
Merge pull request #1764 from michael-grunder/lua_cache_segfault
Fix LUA_OBJCACHE segfault.
parents
01e3f9ba
ea0e2524
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
ce7c4726
...
@@ -237,7 +237,9 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
...
@@ -237,7 +237,9 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
if
(
obj_s
==
NULL
)
break
;
/* Not a string. */
if
(
obj_s
==
NULL
)
break
;
/* Not a string. */
/* Try to use a cached object. */
/* Try to use a cached object. */
if
(
cached_objects
[
j
]
&&
cached_objects_len
[
j
]
>=
obj_len
)
{
if
(
j
<
LUA_CMD_OBJCACHE_SIZE
&&
cached_objects
[
j
]
&&
cached_objects_len
[
j
]
>=
obj_len
)
{
char
*
s
=
cached_objects
[
j
]
->
ptr
;
char
*
s
=
cached_objects
[
j
]
->
ptr
;
struct
sdshdr
*
sh
=
(
void
*
)(
s
-
(
sizeof
(
struct
sdshdr
)));
struct
sdshdr
*
sh
=
(
void
*
)(
s
-
(
sizeof
(
struct
sdshdr
)));
...
...
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