[OpenSIPS-Devel] [OpenSIPS/opensips] efb9e1: rtpproxy: alocate anonymous structures in local scope

Răzvan Crainea noreply at github.com
Tue Mar 9 17:23:55 EST 2021


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: efb9e16de160e976ae5a1ba05388b24d798438c5
      https://github.com/OpenSIPS/opensips/commit/efb9e16de160e976ae5a1ba05388b24d798438c5
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2021-03-09 (Tue, 09 Mar 2021)

  Changed paths:
    M modules/rtpproxy/rtpproxy_vcmd.h

  Log Message:
  -----------
  rtpproxy: alocate anonymous structures in local scope

RTPP_CMD_IOVEC and RTPP_VCMD_INIT_STATIC are initializing a variable
with the content of another (anonymous one). If we however create the
anonymous variable in a block's scope, it will be unavailable at the
end of the block, resulting in invalid memory access - allocating the
structures in the function's context (rather than a block's context)
fixes this issue.
Bug introduced in 0d7a71b2.





More information about the Devel mailing list