[Oisf-devel] patch for (my) ticket #164 content+offset+depth

rmkml rmkml at free.fr
Tue May 25 09:30:44 UTC 2010


Hi,
I have created a small patch for src/detect-depth.c:

@@ -98,8 +98,8 @@
       cd->depth = (uint32_t)atoi(str);
       if (cd->content_len + cd->offset > cd->depth) {
           SCLogDebug("depth increased to %"PRIu32" to match pattern len "
-                 "and offset", cd->content_len + cd->offset);
-         cd->depth = cd->content_len + cd->offset;
+                 "and offset", cd->content_len + cd->offset + (cd->depth - cd->content_len));
+         cd->depth = cd->content_len + cd->offset + (cd->depth - cd->content_len);
       }
   break;

Apply on suricata git 20 May 2010 (b629b7c5c1e2ad6c91b97b6708ad9ddc6a674502)
Not tested(/modified) with uricontent and depth/offset...
Regards
Rmkml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: suricata091pregit20may2010srcdetectdepth.diff
Type: text/x-diff
Size: 724 bytes
Desc: 
URL: <http://lists.openinfosecfoundation.org/pipermail/oisf-devel/attachments/20100525/546cb1e5/attachment.diff>


More information about the Oisf-devel mailing list