[OpenSIPS-Devel] [OpenSIPS/opensips] bf0cbd: Fix reverse_hex2int() prototype

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Feb 5 04:34:25 EST 2018


  Branch: refs/heads/2.3
  Home:   https://github.com/OpenSIPS/opensips
  Commit: bf0cbd05cffbce775e7676f12b0eb3f5e9443cb8
      https://github.com/OpenSIPS/opensips/commit/bf0cbd05cffbce775e7676f12b0eb3f5e9443cb8
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2018-02-05 (Mon, 05 Feb 2018)

  Changed paths:
    M forward.c
    M modules/dialog/dlg_handlers.c
    M modules/dialog/dlg_handlers.h
    M modules/nathelper/sip_pinger.h
    M modules/tm/t_lookup.c
    M ut.h

  Log Message:
  -----------
  Fix reverse_hex2int() prototype

As the computed value is an unsigned (as data size), it cannot be returned as int as it will overflow and get converted to a negative value. This will colide with the negative error ret code -1
Reported by Daniel Zanutti.

(cherry picked from commit 095dc57300b9665b090e999a540db8b391f8d22e)


  Commit: b3fa177d40803e806e22fa38184ffc80b8939b68
      https://github.com/OpenSIPS/opensips/commit/b3fa177d40803e806e22fa38184ffc80b8939b68
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2018-02-05 (Mon, 05 Feb 2018)

  Changed paths:
    M forward.c

  Log Message:
  -----------
  Explicit reset of conn ID on error

if reverse_hex2int fails, be sure the conn id stays 0.

(cherry picked from commit a61fa8646e6f865b347b3e725c6362dc15d4e57b)


  Commit: ecea494a55f7edc7bf1177993f7707729a0a2401
      https://github.com/OpenSIPS/opensips/commit/ecea494a55f7edc7bf1177993f7707729a0a2401
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2018-02-05 (Mon, 05 Feb 2018)

  Changed paths:
    M modules/nathelper/sip_pinger.h
    M ut.h

  Log Message:
  -----------
  Fix reverse_hex2int64() prototype

As the computed value is an unsigned (as data size), it cannot be returned as int as it will overflow and get converted to a negative value. This will colide with the negative error ret code -1

(cherry picked from commit ed12eb97c06a23491c8b831124600361b0b63f2f)


Compare: https://github.com/OpenSIPS/opensips/compare/dd9354f03852...ecea494a55f7


More information about the Devel mailing list