[SPAM] Re: Small bug found

[email protected] Tue, 14 May 2013 12:53:55 -0400
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
--===============4416412681660387154==
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

"Kai Risku" <[email protected]> writes:

Got it.  Interesting... and I never saw the bug because the whole
problem only happens in Windows and I don't have a Windows machine.

But yes, patch accepted.  Thanks!

   - Bill

<<< crm_markovian.c:717  CODE STARTS HERE>>>

  //    Because mmap/munmap doesn't set atime, nor set the "modified"    =
      =20
  //    flag, some network filesystems will fail to mark the file as     =
      =20
  //    modified and so their cacheing will make a mistake.              =
      =20
  //                                                                     =
      =20
  //    The fix is to do a trivial read/write on the .css ile, to force  =
      =20
  //    the filesystem to repropagate it's caches.                       =
      =20
  //                                                                     =
      =20
#ifndef CRM_WINDOWS
  {
    int hfd;                  //  hashfile fd                            =
      =20
    FEATURE_HEADER_STRUCT foo;
    hfd =3D open (&(htext[css_filename_start]), O_RDWR);
    dontcare =3D read (hfd, &foo, sizeof(foo));
    lseek (hfd, 0, SEEK_SET);
    dontcare =3D write (hfd, &foo, sizeof(foo));
    close (hfd);
  }
#endif  // !CRM_WINDOWS     =20

<<<CODE ENDS HERE >>>

> Markovian classifier tries to update the timestamp of the css file, but=
 unfortunately has lost the filename to use.=20
>
> Here is a patch:
>
>
> --- crm_markovian.c.orig        2013-05-13 12:51:52.000000000 +0300
> +++ crm_markovian.c     2013-05-13 12:53:15.000000000 +0300
> @@ -148,6 +148,8 @@
>    //             filename starts at i,  ends at j. null terminate it.
>    htext[j] =3D '\000';
>
> +  int filenameidx =3D i;
> +
>    //             and stat it to get it's length
>    k =3D stat (&htext[i], &statbuf);
>
> @@ -724,7 +726,7 @@
>    {
>      int hfd;                  //  hashfile fd
>      FEATURE_HEADER_STRUCT foo;
> -    hfd =3D open (&(htext[i]), O_RDWR);
> +    hfd =3D open (&(htext[filenameidx]), O_RDWR);
>      dontcare =3D read (hfd, &foo, sizeof(foo));
>      lseek (hfd, 0, SEEK_SET);
>      dontcare =3D write (hfd, &foo, sizeof(foo));
>
>
>
> --
> [email protected]     GSM  +358-40-767 8282
> Oy Arrak Software Ab   http://www.arrak.fi
>
>
>
>
>
>
> -----------------------------------------------------------------------=
-------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily an=
d
> efficiently configure, manage, and operate all of your security control=
s
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Crm114-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crm114-general
> From jzqjhhzh-/[email protected]  Tue May 14 02:02:27 2013
> Return-Path: <jzqjhhzh-/[email protected]>
> X-Original-To: wsy-T3/D8w/[email protected]
> Delivered-To: wsy-T3/D8w/[email protected]
> Received: from cambridge.merl.com (cambridge.merl.com [137.203.190.1])
> 	by zack.merl.com (Postfix) with ESMTP id 18A362C0E6F
> 	for <wsy-T3/D8w/[email protected]>; Tue, 14 May 2013 02:02:25 -0400 (EDT)
> Received: from barracuda.merl.com (barracuda.merl.com [137.203.190.15])
> 	by cambridge.merl.com (8.13.8/8.12.10) with ESMTP id r4E62OO1001151
> 	for <[email protected]>; Tue, 14 May 2013 02:02:24 -0400
> X-ASG-Debug-ID: 1368511341-348b8a850001-bST0pn
> Received: from 137.203.190.15 ([189.75.63.114]) by barracuda.merl.com w=
ith SMTP id 9Gwdbrqc7utAnmHC for <[email protected]>; Tue, 14 May 2013 02:02:2=
2 -0400 (EDT)
> X-Barracuda-Envelope-From: jzqjhhzh-/[email protected]
> X-Barracuda-Apparent-Source-IP: 189.75.63.114
> Received: from 112.93.188.86 by 200.215.14.62; Thu, 16 May 2013 09:55:1=
8 +0400
> From: "=3D?ISO-2022-JP?B?GyRCTCRNaCFKJV8lLyFLISEbKEJpbWFzdWd1LXNmLg=3D=3D=
[email protected]" <ecfkprwa-/[email protected]>
> To: [email protected]
> Subject: =3D?ISO-2022-JP?B?GyRCQDVEPjhAJEMkRiEiJCIkcyReJGpNRjtRJEskTzwr=
Py4kLCQiJGokXiQ7JHMhI0NmP0gkciQ3JEMkKyRqOCskRiQvJGwkaz9NJCwkJCQkJEohIyEjI=
SEbKEJQQVNTOg=3D=3D?=3Dzmpbmohqnzngn
> Date: Thu, 16 May 2013 06:55:18 +0100
> X-ASG-Orig-Subj: =3D?ISO-2022-JP?B?GyRCQDVEPjhAJEMkRiEiJCIkcyReJGpNRjtR=
JEskTzwrPy4kLCQiJGokXiQ7JHMhI0NmP0gkciQ3JEMkKyRqOCskRiQvJGwkaz9NJCwkJCQkJ=
EohIyEjISEbKEJQQVNTOg=3D=3D?=3Dzmpbmohqnzngn
> X-Mailer: eGroups Message Poster
> MIME-Version: 1.0
> Content-Type: text/plain; charset=3D"SHIFT_JIS"
> Content-Transfer-Encoding: 7bit
> X-Barracuda-Connect: UNKNOWN[189.75.63.114]
> X-Barracuda-Start-Time: 1368511341
> X-Barracuda-URL: http://137.203.190.15:8000/cgi-mod/mark.cgi
> X-Virus-Scanned: by bsmtpd at merl.com
> X-Barracuda-Fingerprint-Block: *Spam.Other-238141929
> X-Barracuda-Fingerprint-Found: *Spam.Other-238141929 (b8ff270b183a3759b=
1e61d04e9ae3ed0-120-txt)
> X-Barracuda-BRTS-URL-Found: vc36sr4kyc.mobi (*Spam.Unknown)
> Message-Id: <20130514060224.05A4451FF18-JE8hqn47KVJCirSe2wiuhNBPR1lH4CV8@public.gmane.org>
>
> =82=82=82=90=91=82=C0=D2=81E=81E=81E
> =82=82=82=8A=8C=82=82=82=82=81E=81E=81E
> =96{=8BC=82=82=82=82=90l=82=8C=82=82=82=81E=81E=81E
> =81=81=81
> http://vc36sr4kyc.mobi/vpirm46tsh


--===============4416412681660387154==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
--===============4416412681660387154==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Crm114-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crm114-general

--===============4416412681660387154==--