]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: don't NULL dereference p->flow->protoctx in StreamTcpReassembleDepthReached
authorVictor Julien <victor@inliniac.net>
Thu, 5 Jul 2012 06:12:41 +0000 (08:12 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 5 Jul 2012 06:12:41 +0000 (08:12 +0200)
src/stream-tcp-reassemble.c

index 01b5697e93da4c37e3a5b125e3053943624596e6..abea41caf2002d2080a93c78b7efb864f59a18cd 100644 (file)
@@ -1506,7 +1506,7 @@ static int HandleSegmentStartsAfterListSegment(ThreadVars *tv, TcpReassemblyThre
  *  \retval 0 stream does not have depth reached
  */
 int StreamTcpReassembleDepthReached(Packet *p) {
-    if (p->flow != NULL) {
+    if (p->flow != NULL && p->flow->protoctx != NULL) {
         TcpSession *ssn = p->flow->protoctx;
         TcpStream *stream;
         if (p->flowflags & FLOW_PKT_TOSERVER) {