Re: [Prelude Hybrid IDS] #197: Crash in prelude_connection_permission_new_from_string() with permission="idmef"

"Prelude Hybrid IDS" <[email protected]>
Newsgroups gmane.comp.security.ids.prelude.devel
Message-ID <[email protected]>
#197: Crash in prelude_connection_permission_new_from_string() with
permission="idmef"
-----------------------------------+----------------------------------------
 Reporter:  [email protected]  |        Owner:  yoann            
     Type:  defect                 |       Status:  assigned         
 Priority:  normal                 |    Milestone:  Libprelude 0.9.13
Component:  libprelude             |      Version:  0.9              
 Severity:  critical               |   Resolution:                   
 Keywords:                         |  
-----------------------------------+----------------------------------------
Comment (by yoann):

 Replying to [comment:2 anonymous]:
 > The analysis makes no sense. strsep doesn't set tmp, it only reads from
 it. And if strsep returns a NULL then the while loop would not be entered.

 Victor is correct, strsep will:
  * Overwrite the delimiter found in the input argument with \0.
  * Update the input argument so that it point to the remaining portion of
 the string.
  * Return a pointer to the start of the string if no delimiter was found.

 For reference, here is the strsep manual page:

 ''char *strsep(char **stringp, const char *delim);''

 ''If  *stringp  is  NULL,  the  strsep()  function  returns NULL and does
 nothing else. Otherwise, this function finds the first token in the string
 *stringp, where tokens are delimited by symbols in the string delim.  This
 token is terminated with a ‘\0’ character (by  overwriting  the
 delimiter)  and  *stringp is updated to point past the token.  In case no
 delimiter was found, the token is taken to be the entire string *stringp,
 and *stringp is made NULL.''

-- 
Ticket URL: <https://trac.prelude-ids.org/ticket/197#comment:3>
Prelude Hybrid IDS <http://www.prelude-ids.org>
The Prelude Hybrid Intrusion Detection System suite
_______________________________________________
Prelude-devel site list
[email protected]
http://www.prelude-ids.org/mailman/listinfo/prelude-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.