1
0
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:
Sébastien Helleu
2025-05-18 17:22:10 +02:00
parent acbf1ddfcf
commit 4d617d0e01
+4
View File
@@ -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';