Tiny formatting changes + suppress implicit memcpy warning
*/
#include <stdlib.h>
+#include <string.h>
#include "hiredis.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+ char *new_str, *cmd;
if (size < 3)
return 0;
- char *new_str = malloc(size+1);
+ new_str = malloc(size+1);
if (new_str == NULL)
return 0;
- char *cmd;
- int len;
-
memcpy(new_str, data, size);
new_str[size] = '\0';
- len = redisFormatCommand(&cmd, new_str);
+ redisFormatCommand(&cmd, new_str);
if (cmd != NULL)
hi_free(cmd);
