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

Daniel Roelker droelker at ...402...
Tue Oct 5 09:24:59 EDT 2004


Thanks Dennis.  This will get into snort 2.3.

Dan

On Mon, 2004-10-04 at 04:07, Dennis George 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!
-- 
Daniel Roelker
Lead Snort Developer
Sourcefire, Inc.





More information about the Snort-devel mailing list