Commit 297ecbec authored by michael-grunder's avatar michael-grunder
Browse files

Tiny formatting changes + suppress implicit memcpy warning

parent f746a28e
...@@ -32,27 +32,26 @@ ...@@ -32,27 +32,26 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include "hiredis.h" #include "hiredis.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
char *new_str, *cmd;
if(size<3)
return 0;
char *new_str = malloc(size+1);
if (new_str == NULL)
return 0;
char *cmd; if (size < 3)
int len; return 0;
memcpy(new_str, data, size);
new_str[size] = '\0';
len = redisFormatCommand(&cmd, new_str); new_str = malloc(size+1);
if (new_str == NULL)
if(cmd!=NULL) return 0;
hi_free(cmd);
free(new_str); memcpy(new_str, data, size);
return 0; new_str[size] = '\0';
redisFormatCommand(&cmd, new_str);
if (cmd != NULL)
hi_free(cmd);
free(new_str);
return 0;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment