[Snort-devel] ParsePreprocessor :: is it a safe access ??

Dennis George easyeinfo at ...398...
Tue Oct 5 03:10:05 EDT 2004


I think its better to move the mSplitFree below the if statement....... 
 
Dennis

Dennis George <easyeinfo at ...398...> wrote:
Hi all,
 
This is not so important question.... but just wondering ... will this code cause any problem......................
 
File : parser.c
Function : ParsePreprocessor
 
In this function a reference of pp_head was taken and the reference is used after freeing the memory of pp_head............. Is it correct or I just ignored something ???
 
Thanks in advance
Dennis
.................................................................
 
    char * funcname ;
 
    ...............
 
    /* set a pointer to the actual keyword */
    funcname = pp_head[1];

     ...............
 
    mSplitFree(&pp_head, num_head_toks);  // deleting pp_head
 
    if(!found)
    {
        FatalError(" unknown preprocessor \"%s\"\n",
                   funcname);  // after pp_head got deleted ...accessing funcname
    }

 
 


---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20041005/73cde692/attachment.html>


More information about the Snort-devel mailing list