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

Liviu Chircu liviu at opensips.org
Mon May 30 11:54:41 CEST 2016


  Branch: refs/heads/2.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 3a5138be3392dd89630104e081edccf4db90272e
      https://github.com/OpenSIPS/opensips/commit/3a5138be3392dd89630104e081edccf4db90272e
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2016-05-30 (Mon, 30 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/avpops/avpops_impl.h
    M modules/db_mysql/db_mysql.c
    M modules/db_mysql/dbase.c
    M modules/db_mysql/dbase.h

  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)

Conflicts:
	db/db.h
	modules/avpops/avpops_impl.c
	modules/db_mysql/dbase.c
	modules/db_mysql/dbase.h
	modules/db_sqlite/db_sqlite.c
	modules/db_virtual/db_virtual.c
	modules/db_virtual/dbase.c
	modules/db_virtual/dbase.h
	modules/sipcapture/sipcapture.c




More information about the Devel mailing list