X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/89bf1ada977fd8c84e395de5e664f3d4dff912a6..56d1a7c8820bd8913b68eafb8566a4185dd188b1:/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(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;