aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_community_id.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-04-20 18:15:23 +0200
committerGitHub <noreply@github.com>2024-04-20 18:15:23 +0200
commitef891834699db2b0ed16e32fc2d352e8a8419945 (patch)
treedf39f9d6bf678d5286bdd48dd365a1f4828d14f6 /src/lib/ndpi_community_id.c
parent905120588bf2a1bb56b280d9accd89e7265b8364 (diff)
fuzz: improvements (#2400)
Create the zip file with all the traces only once. Add a new fuzzer to test "shoco" compression algorithm
Diffstat (limited to 'src/lib/ndpi_community_id.c')
-rw-r--r--src/lib/ndpi_community_id.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/ndpi_community_id.c b/src/lib/ndpi_community_id.c
index de66b2954..6074599f1 100644
--- a/src/lib/ndpi_community_id.c
+++ b/src/lib/ndpi_community_id.c
@@ -67,10 +67,7 @@
/* **************************************************** */
static u_int16_t ndpi_community_id_buf_copy(u_int8_t * const dst, const void * const src, u_int16_t len) {
- if(src)
- memcpy(dst, src, len);
- else
- memset(dst, 0, len);
+ memcpy(dst, src, len);
return len;
}