]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fix event queue buffer log size
authorsnorty <snorty@localhost.localdomain>
Thu, 4 Aug 2016 19:13:30 +0000 (15:13 -0400)
committersnorty <snorty@localhost.localdomain>
Tue, 9 Aug 2016 21:33:29 +0000 (17:33 -0400)
src/detection/detection_util.cc

index 69f4fdff680c119c92e5841bc3ee81b07ffc64fe..4254cf70108135f5a2233e4a7f6dab2d7608fad2 100644 (file)
@@ -93,7 +93,9 @@ void EventTrace_Log(const Packet* p, const OptTreeNode* otn, int action)
         "Pkt Cnts: Dsz=%u, Alt=%u\n",
         (unsigned)p->dsize, (unsigned)p->alt_dsize);
 
-    LogBuffer("Packet", p->data, p->alt_dsize);
+    // FIXIT-L delete alt_dsize (only set by OHI)
+    uint16_t n = p->alt_dsize > 0 ? p->alt_dsize : p->dsize;
+    LogBuffer("Packet", p->data, n);
 
     nEvents++;
 }