[OpenSIPS-Devel] [OpenSIPS/opensips] ed8bf4: [pua] fix the computing of presentity ID (pres_id)

Bogdan Andrei IANCU noreply at github.com
Mon Jan 23 09:00:39 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: ed8bf4d47a5302b74006ce0312797928fc843e98
      https://github.com/OpenSIPS/opensips/commit/ed8bf4d47a5302b74006ce0312797928fc843e98
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
    M modules/pua/hash.c
    M modules/pua/hash.h
    M modules/pua/pua.c

  Log Message:
  -----------
  [pua] fix the computing of presentity ID (pres_id)

- be sure the hash size does not overflow (on user setting), as it has to fit on half long size
- when computing pres_id, be sure to cast to long to avoid premature overflow
- when incrementing local_index, be sure it does no overflow half long size





More information about the Devel mailing list