From 2b30c36e6ab5b21defb76ec6458ab7687984484c Mon Sep 17 00:00:00 2001
From: Jan Klemkow <j.klemkow@wemelug.de>
Date: Thu, 17 Apr 2025 19:02:16 +0200
Subject: [PATCH] Fix Buffer Overflow #97

---
 src/igmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/igmp.c b/src/igmp.c
index a80c4e5..838694c 100644
--- src/igmp.c
+++ src/igmp.c
@@ -94,7 +94,7 @@ static const char *igmpPacketKind(unsigned int type, unsigned int code) {
     case IGMP_V2_LEAVE_GROUP:        return "Leave message     ";
 
     default:
-        sprintf(unknown, "unk: 0x%02x/0x%02x    ", type, code);
+        snprintf(unknown, sizeof unknown, "unk: 0x%02x/0x%02x    ", type, code);
         return unknown;
     }
 }
