[OpenSIPS-Devel] [OpenSIPS/opensips] 6b9e14: route params: Fix regression in 8761ce6d20
Liviu Chircu
noreply at github.com
Thu Feb 16 17:18:31 UTC 2023
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: 6b9e140f6576ba66be6f74e686a5fd33c0a16603
https://github.com/OpenSIPS/opensips/commit/6b9e140f6576ba66be6f74e686a5fd33c0a16603
Author: Liviu Chircu <liviu at opensips.org>
Date: 2023-02-16 (Thu, 16 Feb 2023)
Changed paths:
M action.c
Log Message:
-----------
route params: Fix regression in 8761ce6d20
The patch assumed that variables with PV_VAL_INT|PV_TYPE_INT have
symmetric values (e.g. 5 and "5"), whereas this is not always the case
(e.g. 1 and "INVITE", returned by $rm) and would proceed to duplicate
the output buffer as a int2str() buffer, for safety purposes.
The fix is to avoid the duplication completely (i.e. do not overwrite
"INVITE" with "1"), thanks to the route params array string buffers
having a sufficiently large lifetime in order to be safely returned to
the calling code asking for the route parameter.
More information about the Devel
mailing list