From 5f1895a7b496fa78a2927bd5fe610ab619a3f49b Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 21 Nov 2023 09:34:28 +0100 Subject: [PATCH] Fix oss-fuzz issue 64237 (#1244) Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64237 --- Packet++/src/NtpLayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packet++/src/NtpLayer.cpp b/Packet++/src/NtpLayer.cpp index aaada47e1d..6c135852e5 100644 --- a/Packet++/src/NtpLayer.cpp +++ b/Packet++/src/NtpLayer.cpp @@ -249,8 +249,8 @@ namespace pcpp return "A step change in system time has occurred, but the association has not yet resynchronized"; default: { - char arrBuff[4] = {static_cast((refID >> 24) & 0xFF), static_cast((refID >> 16) & 0xFF), - static_cast((refID >> 8) & 0xFF), static_cast((refID) & 0xFF)}; + char arrBuff[5] = {static_cast((refID >> 24) & 0xFF), static_cast((refID >> 16) & 0xFF), + static_cast((refID >> 8) & 0xFF), static_cast((refID) & 0xFF), '\0'}; return arrBuff; } }