mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 17:53:13 +02:00
tests/fuzz: ignore huge data in fuzz testing of calculation functions
This commit is contained in:
@@ -35,6 +35,10 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
|
||||
{
|
||||
char *str;
|
||||
|
||||
/* ignore huge data */
|
||||
if (size > 65536)
|
||||
return 0;
|
||||
|
||||
str = (char *)malloc (size + 1);
|
||||
memcpy (str, data, size);
|
||||
str[size] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user