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

Anca Vamanu anca at opensips.org
Mon Oct 5 17:55:49 CEST 2009


Hi Juha,

You are were right. I made a fix myself and only after I saw your second 
e-mail with the patch.  Your solution was a bit faster  :), I didn't 
notice that the difference was already calculated.

Thank you,
Anca

Juha Heinanen wrote:
> 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
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>   



More information about the Devel mailing list