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

Liviu Chircu liviu at opensips.org
Fri May 20 18:11:28 CEST 2016


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




More information about the Devel mailing list