[OpenSIPS-Devel] [OpenSIPS/opensips] 8b9307: db_text: Fix Coverity warning (bad 'switch' fallth...

Liviu Chircu noreply at github.com
Fri Jul 17 13:41:05 EST 2020


  Branch: refs/heads/3.0
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 8b9307f2ec54a0f1551599254d1afbc6e0f7799b
      https://github.com/OpenSIPS/opensips/commit/8b9307f2ec54a0f1551599254d1afbc6e0f7799b
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/db_text/dbt_lib.c

  Log Message:
  -----------
  db_text: Fix Coverity warning (bad 'switch' fallthrough)

Thanks to Răzvan Crainea for the help!

(cherry picked from commit 6b56ca5fa1163bc290a4c01f554e07cae860fa8c)


  Commit: 882e04cd90dad53cbecd50ce90bd93584083caac
      https://github.com/OpenSIPS/opensips/commit/882e04cd90dad53cbecd50ce90bd93584083caac
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M ut.h

  Log Message:
  -----------
  stop_expire_timer(): Fix uninitialized memory access

The severity is low, however, since uninitialized integer math is still
safe (from a stability PoV), with the resulting value being ignored
anyway.

Fixes CID #199911, #199922, #199926, #199966, #199987, #199990, #200085,
 #200054.

(cherry picked from commit c6682f208c6da5ce1517737e52835aafc5b3f2fa)


  Commit: df197a285b7b6d3c751dce42a65f69a7d5abe68b
      https://github.com/OpenSIPS/opensips/commit/df197a285b7b6d3c751dce42a65f69a7d5abe68b
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/mid_registrar/save.c

  Log Message:
  -----------
  mid_registrar: Fix uninitialized variable

Although the severity is low, this code path could be triggered by a
bogus downstream registrar which returns a 200 OK without the Contact
advertised by the mid-registrar in its REGISTER request.

Fixes CID #200051

(cherry picked from commit a4684d54f1d32088936a345afa36cb66bbf53727)


  Commit: ffce9969422312900bab6b35952391708ab542c2
      https://github.com/OpenSIPS/opensips/commit/ffce9969422312900bab6b35952391708ab542c2
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M cfg_pp.c

  Log Message:
  -----------
  preprocessor: Fix memleak on preprocessing failure

Fixes CID #200047

(cherry picked from commit 36a361d63cc77141314acd84551a5340b2c3db42)


  Commit: 96428bcf3e5f849486862f6f4a481674e1d6fed3
      https://github.com/OpenSIPS/opensips/commit/96428bcf3e5f849486862f6f4a481674e1d6fed3
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/usrloc/dlist.c

  Log Message:
  -----------
  usrloc: Fix unitialized variable

CID #199971

(cherry picked from commit 5f03b8556bf241336795ba8ca517c982d732dd4a)


  Commit: 2aa619c00666e85631cd687f243d05585ac1478f
      https://github.com/OpenSIPS/opensips/commit/2aa619c00666e85631cd687f243d05585ac1478f
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/freeswitch/esl/src/esl.c

  Log Message:
  -----------
  freeswitch: Fix a rare memleak

CID #164007

(cherry picked from commit 2a9824cdc955eb783e08f88906b70d337dbdebe9)


  Commit: 18c81be67ba3888b80b47e88c6695cd89af0c642
      https://github.com/OpenSIPS/opensips/commit/18c81be67ba3888b80b47e88c6695cd89af0c642
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M mem/hp_malloc_dyn.h

  Log Message:
  -----------
  HP_MALLOC status logging: Fix incorrect bitwise shift

CID #200101

(cherry picked from commit fcdd224a5c8638a28e3be10e4028c27aa404a637)


  Commit: b497af00652cac0421f9e316bec4d5d12bb9ede3
      https://github.com/OpenSIPS/opensips/commit/b497af00652cac0421f9e316bec4d5d12bb9ede3
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M statistics.h

  Log Message:
  -----------
  statistics macros: Avoid unsigned integer comparisons against 0

CID #199900, #199913, #199923, #199934, #199941, #199964, #199998,
 #200032, #200049, #200074, #200096.

(cherry picked from commit 39fc05ec0ff2122dd79ec5582ac020c999c11c30)


  Commit: c34e15660de83681a16c84ec61b96a85ec460e5d
      https://github.com/OpenSIPS/opensips/commit/c34e15660de83681a16c84ec61b96a85ec460e5d
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/mid_registrar/save.c

  Log Message:
  -----------
  mid_registrar: Remove unnecessary check

CID #199954

(cherry picked from commit 7a638403ee648ba629fd1f6f4a17bdea091da16d)


  Commit: 42b71cf855efa610c1c408caea7c3e54c039aa3f
      https://github.com/OpenSIPS/opensips/commit/42b71cf855efa610c1c408caea7c3e54c039aa3f
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/usrloc/ucontact.c

  Log Message:
  -----------
  usrloc: Remove unnecessary NULL check

CID #200086

(cherry picked from commit f305fa88f9341f37eb95bf88980e974723b57e94)


  Commit: 85464ef2a96f9a3b4665f8ddbeea3292149eac79
      https://github.com/OpenSIPS/opensips/commit/85464ef2a96f9a3b4665f8ddbeea3292149eac79
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/mid_registrar/save.c

  Log Message:
  -----------
  mid_registrar: Add paranoid safety check

This extra check doesn't fix anything right now, but at least it makes
Coverity happy.

CID #200020

(cherry picked from commit 2e60b50228a80c1e9629e43670a8cbcc5f71839c)


  Commit: 4f3ed1239338e0c647bb387dcf5acdb51a6f3162
      https://github.com/OpenSIPS/opensips/commit/4f3ed1239338e0c647bb387dcf5acdb51a6f3162
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M sr_module.c

  Log Message:
  -----------
  sanitize mpath length

Fix Coverity #199897

(cherry picked from commit 587316afc6032142c96077e3efac8029d7fa8355)


  Commit: 0108f2e7cba7e596b8f2ab20e0e176cbc9720744
      https://github.com/OpenSIPS/opensips/commit/0108f2e7cba7e596b8f2ab20e0e176cbc9720744
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M net/net_tcp.c
    M sr_module.c

  Log Message:
  -----------
  mpath: Fix possible buffer underrun

Also attempt to mask the false positive in CID #200070.

CID #211377

(cherry picked from commit 7f244f17a54833c6bb3f9ea58aa4afd855774ce1)


  Commit: 2a8008ac6280059b9ba5548e7d856db7e0953ffb
      https://github.com/OpenSIPS/opensips/commit/2a8008ac6280059b9ba5548e7d856db7e0953ffb
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/drouting/routing.c

  Log Message:
  -----------
  drouting: Always NULL-terminate the GW buffer

While this doesn't immediately fix any bug, it should make Coverity
happy.

CID #200062

(cherry picked from commit df2ce6d826587f1130c5928b0815bd10ed2957f1)


  Commit: 5ff4861e836cd97889c831c5f3533a985fb19d5e
      https://github.com/OpenSIPS/opensips/commit/5ff4861e836cd97889c831c5f3533a985fb19d5e
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/exec/exec.c

  Log Message:
  -----------
  exec: Always NULL-terminate the read buffer

CID #200052

(cherry picked from commit 0230f9c9032bd01661c6c7c197965528507e3f2c)


  Commit: a2ae1349a19b2fc79d1893bef96d7f01434020cf
      https://github.com/OpenSIPS/opensips/commit/a2ae1349a19b2fc79d1893bef96d7f01434020cf
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/mi_datagram/datagram_fnc.c
    M modules/mi_datagram/mi_datagram.c

  Log Message:
  -----------
  mi_datagram: Minor improvements

    * always NULL-terminate the read buffer (CID #200029).  Doesn't fix
      any known bug, just a good practice
    * avoid redundant memset(65535) on each read
    * improve startup error log

(cherry picked from commit 0eee2119991270bd23a6279e6b1a825586f2d227)


  Commit: dd7023ad8eea5e9659a1550558608249cf2b3d50
      https://github.com/OpenSIPS/opensips/commit/dd7023ad8eea5e9659a1550558608249cf2b3d50
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M net/proto_udp/proto_udp.c

  Log Message:
  -----------
  proto_udp: Supress Coverity false positive

CID #200029

(cherry picked from commit 33a0d617d4bc485e66a975d075cafb79a125de6d)


  Commit: 11205ebef3ec4f207f33f01afe209518a0ed4453
      https://github.com/OpenSIPS/opensips/commit/11205ebef3ec4f207f33f01afe209518a0ed4453
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/db_text/dbt_res.c
    M modules/db_text/dbt_tb.c

  Log Message:
  -----------
  db_text: Complete 65b18091

(cherry picked from commit 673cf7f9eb3e5bd3a8da805483885e049bddc873)


  Commit: b6468a09502a1591aaa3bab50b626c067d738767
      https://github.com/OpenSIPS/opensips/commit/b6468a09502a1591aaa3bab50b626c067d738767
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/tracer/tracer.c

  Log Message:
  -----------
  tracer: Fix unchecked return codes

CID #200092, #200088

(cherry picked from commit 82dfe4c408e614750c819e0a566a7312b96ec02a)


  Commit: 5e92aea4bb763a22da5794c2d38b297ad0cce1aa
      https://github.com/OpenSIPS/opensips/commit/5e92aea4bb763a22da5794c2d38b297ad0cce1aa
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/rest_client/rest_methods.c

  Log Message:
  -----------
  rest_client: Mask Coverity false positive

It is fine to push a stack pointer into libcurl during a sync transfer,
since the control flow never leaves the original function before it is
completely done with the library.

CID #200078

(cherry picked from commit 374fde456c1f713a3cea29c90ccfb3d3d4de8ede)


  Commit: 96134848afee9a3703bbd42a520ed118fe236fab
      https://github.com/OpenSIPS/opensips/commit/96134848afee9a3703bbd42a520ed118fe236fab
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M modules/tracer/tracer.c

  Log Message:
  -----------
  tracer: Fix possible crash on NULL context

CID #200069

(cherry picked from commit 1b4fcc06af59e479547d348935300949f0dfb70d)


Compare: https://github.com/OpenSIPS/opensips/compare/cad6ab066ae5...96134848afee



More information about the Devel mailing list