[OpenSIPS-Devel] [OpenSIPS/opensips] 9bcf7b: db_sqlite: fix possible crash when the values is r...

Răzvan Crainea noreply at github.com
Wed Aug 16 13:37:29 UTC 2023


  Branch: refs/heads/3.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 9bcf7b50eed30bfe85ed563f9a7fb32c2dd67d2f
      https://github.com/OpenSIPS/opensips/commit/9bcf7b50eed30bfe85ed563f9a7fb32c2dd67d2f
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2023-08-16 (Wed, 16 Aug 2023)

  Changed paths:
    M modules/db_sqlite/res.c

  Log Message:
  -----------
  db_sqlite: fix possible crash when the values is relocated

When the query does not manage to count the rows in a first shot, the
values buffer might be reallocated, which can result in a relocation of
the buffer - if that's the case, we should repoint all the old values to
the new location, otherwise they will point to an invalid value.

Many thanks to Rob Moore and Steven Ayre from Dubber for reporting and
helping us testing and troubleshooting this corner case.

(cherry picked from commit 45aa9a947c6306f5723132f9c38903988be6cf8b)





More information about the Devel mailing list