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

Răzvan Crainea noreply at github.com
Tue Mar 14 15:01:11 UTC 2023

  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: c7bfcc2019bc1a0223607218274e0a31fbd207c7
  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!

(cherry picked from commit 7f845994b1ba43f8ffc0c0bdc6c9b8065a935955)

More information about the Devel mailing list