[OpenSIPS-Devel] [OpenSIPS/opensips] 3d2461: cachedb_mongodb SQL adapter: Dup all string columns

Liviu Chircu noreply at github.com
Wed Jan 15 12:06:27 EST 2020


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 3d2461220d20c41ef88155cc431a0e0645941e48
      https://github.com/OpenSIPS/opensips/commit/3d2461220d20c41ef88155cc431a0e0645941e48
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-01-15 (Wed, 15 Jan 2020)

  Changed paths:
    M modules/cachedb_mongodb/cachedb_mongodb_dbase.c

  Log Message:
  -----------
  cachedb_mongodb SQL adapter: Dup all string columns

The strings provided by bson_iter_utf8() and bson_iter_binary() are
ephemeral.  We must duplicate them as soon as possible, to prevent
invalid memory pointers within the result set as multiple rows get
processed.

Fixes #1903

(cherry picked from commit 50992ba690d2eca0f0751676f510097e68175034)
(cherry picked from commit 4207abc5841b5c9fc50f233eb5a09d5007dc4031)





More information about the Devel mailing list