[OpenSIPS-Devel] [OpenSIPS/opensips] 1fd312: drouting: Fix out-of-bound initialization

Le Roy Christophe c.leroy at alphalink.fr
Sat Feb 4 11:52:49 EST 2017


  Branch: refs/heads/2.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 1fd312f1fb388e0ea8557fe503b421214dfcec6e
      https://github.com/OpenSIPS/opensips/commit/1fd312f1fb388e0ea8557fe503b421214dfcec6e
  Author: Le Roy Christophe <c.leroy at alphalink.fr>
  Date:   2017-02-04 (Sat, 04 Feb 2017)

  Changed paths:
    M modules/drouting/routing.c

  Log Message:
  -----------
  drouting: Fix out-of-bound initialization

Upon load/reload of drouting tables, if parse_destination_list() needs to
increase destinations array size, it asks for a new array twice the size of
the previous one.
It memset() the newly allocated capacity, skipping memory that is to be filled
with already learnt destinations, but using the array size instead of the
remaining capacity.
This patch fixes the size for this memset().

Closes OpenSIPS/opensips#1039

(cherry picked from commit b11ce9723f1ca43cb7646b96e51dfa306a6280d7)




More information about the Devel mailing list