[OpenSIPS-Devel] [OpenSIPS/opensips] dc77cf: Fix invalid memory access with async MySQL queries

Liviu Chircu liviu at opensips.org
Fri May 20 18:13:27 CEST 2016


  Branch: refs/heads/2.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: dc77cfdd77cf3cf340b826601f713ca114388dc6
      https://github.com/OpenSIPS/opensips/commit/dc77cfdd77cf3cf340b826601f713ca114388dc6
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2016-05-20 (Fri, 20 May 2016)

  Changed paths:
    M db/db.c
    M db/db.h
    M db/db_async.c
    M db/db_async.h
    M modules/avpops/avpops_impl.c
    M modules/db_mysql/db_mysql.c
    M modules/db_mysql/dbase.c
    M modules/db_mysql/dbase.h
    M modules/db_sqlite/db_sqlite.c
    M modules/db_virtual/db_virtual.c
    M modules/db_virtual/dbase.c
    M modules/db_virtual/dbase.h
    M modules/sipcapture/sipcapture.c

  Log Message:
  -----------
  Fix invalid memory access with async MySQL queries

Due to the way the libmysqlclient query result strings were managed,
they would be freed by the library before OpenSIPS would copy them
into the output AVPs.

This patch fixes the issue by adding a new DB API function which handles
the cleanup of async query results.

Reported by Ovidiu Sas
Addresses issue #873

(cherry picked from commit 177c60a0e13471a87d80f21504894b883038ffa4)




More information about the Devel mailing list