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

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


  Branch: refs/heads/1.11
  Home:   https://github.com/OpenSIPS/opensips
  Commit: d7b36dfb95b986e609710d2477bf320ea323bbc8
      https://github.com/OpenSIPS/opensips/commit/d7b36dfb95b986e609710d2477bf320ea323bbc8
  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