[OpenSIPS-Devel] [OpenSIPS/opensips] 7f8459: event_route: fix crash when raising with no params

Răzvan Crainea noreply at github.com
Tue Mar 14 14:59:29 UTC 2023

  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 7f845994b1ba43f8ffc0c0bdc6c9b8065a935955
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-03-14 (Tue, 14 Mar 2023)

  Changed paths:
    M modules/event_route/route_send.c

  Log Message:
  event_route: fix crash when raising with no params

When raising an event using `raise_event` with AVP values that are not
correctly populated, it triggers a corner case in the event_route
module: the module "serializes" the parameters just after the event,
hence, if there is no expanded parameter, the first parameter ends up
pointing to a bogus value, resulting in a crash.

This commit fixes this corner case by treating  it (0 expanded
parameters) just as if there no parameters passed at all.

Many thanks to David Escartin from Sonoc for the help in troubleshooting
this issue!

More information about the Devel mailing list