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
hiredis
Commits
77e4f09e
Unverified
Commit
77e4f09e
authored
Aug 29, 2022
by
Michael Grunder
Committed by
GitHub
Aug 29, 2022
Browse files
Merge pull request #964 from afcidk/fix-createDoubleObject
Fix potential fault at createDoubleObject
parents
9219f7e7
50cdcab4
Changes
1
Hide whitespace changes
Inline
Side-by-side
hiredis.c
View file @
77e4f09e
...
...
@@ -221,6 +221,9 @@ static void *createIntegerObject(const redisReadTask *task, long long value) {
static
void
*
createDoubleObject
(
const
redisReadTask
*
task
,
double
value
,
char
*
str
,
size_t
len
)
{
redisReply
*
r
,
*
parent
;
if
(
len
==
SIZE_MAX
)
// Prevents hi_malloc(0) if len equals to SIZE_MAX
return
NULL
;
r
=
createReplyObject
(
REDIS_REPLY_DOUBLE
);
if
(
r
==
NULL
)
return
NULL
;
...
...
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