[OpenSIPS-Devel] [OpenSIPS/opensips] 9902dd: cachedb_mongodb: Fix possible raw query crashes

Liviu Chircu noreply at github.com
Mon Jul 5 12:59:55 EST 2021


  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 9902dda66dcd85ab5cd3410749dfdcc9a0a47510
      https://github.com/OpenSIPS/opensips/commit/9902dda66dcd85ab5cd3410749dfdcc9a0a47510
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2021-07-05 (Mon, 05 Jul 2021)

  Changed paths:
    M modules/cachedb_mongodb/cachedb_mongodb_dbase.c

  Log Message:
  -----------
  cachedb_mongodb: Fix possible raw query crashes

This patch fixes a series of bugs:

* raw queries with no result AVP holder, causing a crash, e.g.:
    cache_raw_query("mongodb", '
	"delete": "test",
        "deletes": [
            {"q": {}, "limit": 0}
        ]}');

* raw queries with bad syntax, causing a crash
* pkg memory leak during the "out of pkg memory" condition

Credits to Bogdan-Andrei Iancu for the finds!

(cherry picked from commit 0f748f46cf4b164890d024e8f9938b076137ce84)





More information about the Devel mailing list