Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
1abe0c82
Commit
1abe0c82
authored
Sep 01, 2022
by
Björn Svensson
Committed by
Michael Grunder
Sep 01, 2022
Browse files
fuzzer: No alloc in redisFormatCommand() when fail
parent
329eaf9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
fuzzing/format_command_fuzzer.c
View file @
1abe0c82
...
@@ -48,10 +48,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
...
@@ -48,10 +48,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
memcpy
(
new_str
,
data
,
size
);
memcpy
(
new_str
,
data
,
size
);
new_str
[
size
]
=
'\0'
;
new_str
[
size
]
=
'\0'
;
redisFormatCommand
(
&
cmd
,
new_str
);
if
(
redisFormatCommand
(
&
cmd
,
new_str
)
!=
-
1
)
if
(
cmd
!=
NULL
)
hi_free
(
cmd
);
hi_free
(
cmd
);
free
(
new_str
);
free
(
new_str
);
return
0
;
return
0
;
}
}
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