[OpenSIPS-Devel] [OpenSIPS/opensips] 0fa6e7: acc: Fix prepared statements for the missed/acc ta...

Liviu Chircu noreply at github.com
Wed Nov 4 10:01:26 EST 2020


  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 0fa6e7d46333d6ae0f6e53c6ceae0bdb9ef0736c
      https://github.com/OpenSIPS/opensips/commit/0fa6e7d46333d6ae0f6e53c6ceae0bdb9ef0736c
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/acc/acc.c

  Log Message:
  -----------
  acc: Fix prepared statements for the missed/acc tables

Commit 4bc134fe3b introduced a regression where the reused PS for the
"missed_calls" table (9 fields) would no longer match the PS for the
"acc" table (11 fields).  By reusing the former PS array, which is
shorter than required, the code would segfault.  Example scenario:

    * simple call from A -> B with:
        * do_accounting("db", "missed|failed")
        * call failure (e.g. 408 Request Timeout)
    * code crashes as soon as the "failed" acc entry is written

Many thanks to Nexphone for sponsoring this fix

(cherry picked from commit 5b868337e60f0e9d503d6233409412abd27d2818)





More information about the Devel mailing list