X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7d8cd97c12ce291be0da9e16e4c1d136020a246d..20072b367cf034ab9124560e4a06d8e32a388d93:/projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp

diff --git a/projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp b/projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp
index 41817d92..400709bd 100644
--- a/projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp
+++ b/projects/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp
@@ -165,11 +165,11 @@ pthread_sigmask(SIG_BLOCK, &signalSet, NULL);
 DIVERT_CAP * dc = static_cast<DIVERT_CAP *>(d);
 dc->isRunning = true;
 
-char buffer[64];
+char buffer[pcktSize + 14];
 while (dc->nonstop)
     {
     RAW_PACKET rp;
-    dc->DivertCapRead(buffer, 64, NULL);
+    dc->DivertCapRead(buffer, sizeof(buffer), NULL);
 
     if (buffer[12] != 0x8)
         continue;