[OpenSIPS-Devel] [OpenSIPS/opensips] 50992b: cachedb_mongodb SQL adapter: Dup all string columns

Liviu Chircu noreply at github.com
Wed Jan 15 12:03:24 EST 2020


  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 50992ba690d2eca0f0751676f510097e68175034
      https://github.com/OpenSIPS/opensips/commit/50992ba690d2eca0f0751676f510097e68175034
  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
    M ut.h

  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





More information about the Devel mailing list