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
b5830486
Commit
b5830486
authored
Oct 23, 2019
by
antirez
Browse files
Modules: fix moduleCreateArgvFromUserFormat() casting bug.
In 32 bit systems casting to "long" will cut the result to 32 bit.
parent
b7a2a53a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
b5830486
...
...
@@ -2811,7 +2811,7 @@ robj **moduleCreateArgvFromUserFormat(const char *cmdname, const char *fmt, int
size_t
len
=
va_arg
(
ap
,
size_t
);
argv
[
argc
++
]
=
createStringObject
(
buf
,
len
);
}
else
if
(
*
p
==
'l'
)
{
long
ll
=
va_arg
(
ap
,
long
long
);
long
long
ll
=
va_arg
(
ap
,
long
long
);
argv
[
argc
++
]
=
createObject
(
OBJ_STRING
,
sdsfromlonglong
(
ll
));
}
else
if
(
*
p
==
'v'
)
{
/* A vector of strings */
...
...
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