[OpenSIPS-Devel] buggy event_parser in parse_event.c?

Juha Heinanen jh at tutpro.com
Mon Oct 5 16:36:30 CEST 2009


Juha Heinanen writes:

 > then i started to read parse_event.c/event_parser() code and it didn't
 > make sense to me:
 > 
 > - after parsing the event, it goes to check if next char is ';':
 > 
 > 	if( (*end)== ';')
 > 
 >   is that correct, because there may not be a next char, i.e., end may
 >   point to random byte after the event string?  if it does so, error
 >   results if the next char happens to be ';'.
 > 
 > - why is event sting copied to buf, for which i don't see any use in the
 >   function?

i'm proposing the enclosed diff to parse_event.c in order to get rid of
invalid error messages and unused buf.

-- juha

-------------- next part --------------
A non-text attachment was scrubbed...
Name: parse_event.c-diff
Type: application/octet-stream
Size: 858 bytes
Desc: parse_event.c-diff
Url : http://lists.opensips.org/pipermail/devel/attachments/20091005/b60334ad/attachment.obj 


More information about the Devel mailing list