OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
[Snort-users] BUG in fpdetect.c (2.1.0)?

From: Stephen Reed (sdreedverizon.net)
Date: Fri Jan 09 2004 - 14:44:17 CST


All-

Can anyone verify?

I apologize if this bug has already been posted... I can't seem to get access to the archives...

I was running some tests between 2.0.5 and 2.1.0 and was getting different output results for the same rules.

I think I have tracked a bug down to fpdetect.c on or about line 303. iMatchIndex is not initialized appropriately. Corrected function is (one line added):

static INLINE void InitMatchInfo(OTNX_MATCH_DATA *o)
{
    int i = 0;

    for(i = 0; i < o->iMatchInfoArraySize; i++)
    {
        o->matchInfo[i].iMatchCount = 0;
        o->matchInfo[i].iMatchMaxLen = 0;
        o->matchInfo[i].iMatchIndex = 0; /* new */
    }
}

Things seem to be working better now for me with this line added.

Comments welcomed & appreciated. Thanks.

-Stephen

 

-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Snort-users mailing list
Snort-userslists.sourceforge.net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users