[OpenSIPS-Devel] [OpenSIPS/opensips] 7f6f75: topo_hiding: always allocate space for DID in user
Răzvan Crainea
noreply at github.com
Thu Oct 29 10:39:04 EST 2020
Branch: refs/heads/2.4
Home: https://github.com/OpenSIPS/opensips
Commit: 7f6f75900e7f8e3324b15165ceb83241445acf1f
https://github.com/OpenSIPS/opensips/commit/7f6f75900e7f8e3324b15165ceb83241445acf1f
Author: Razvan Crainea <razvan at opensips.org>
Date: 2020-10-29 (Thu, 29 Oct 2020)
Changed paths:
M modules/topology_hiding/topo_hiding_logic.c
Log Message:
-----------
topo_hiding: always allocate space for DID in user
When contact could not be parsed, the new Contact's prefix was not
allocating bytes in buffer for storing for the dialog ID in the user
part. However, the DID was appended to the prefix without any error
checks, resulting in a memory corruption. This commit always allocates
spaces for storing the Dialog ID, even if the contact could not be
parsed.
This fixes all uses of the topology_hiding() function with the `D` flag.
Thanks a lot Sergei Lavrov (@ccppprogrammer) for reporting this in
ticket #2285 and for offering information for figure it out. Close #2285
(cherry picked from commit 2ea8f86813bfbf87b4b0ab61c9f3e852ce777f4c)
More information about the Devel
mailing list