[OpenSIPS-Devel] [OpenSIPS/opensips] 2ffd96: Fix wrong type of lumps.

Bogdan Andrei IANCU noreply at github.com
Wed Jun 24 14:37:34 EST 2020


  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 2ffd96f974b5809e6d47c766d0257d176c55a023
      https://github.com/OpenSIPS/opensips/commit/2ffd96f974b5809e6d47c766d0257d176c55a023
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2020-06-24 (Wed, 24 Jun 2020)

  Changed paths:
    M parser/msg_parser.c

  Log Message:
  -----------
  Fix wrong type of lumps.

As the eoh (Enf Of Header) is determined during the on-demand parsing, the add_lump() may wrongly lable a lump as "header" or "body" (as the add_lump() may be used before the parsing reached the EOH).
So, better identify all headers asap, so the add_lump() will properly work all the time. This will not add any overhead, as in 99.9999% of the case, due the functions used in cfg, anyhow you end up parsing the whole message.

Fixes  #2144
This is a 100% safe fix, there are 0 chances for side effects.

(cherry picked from commit 23e098f0ec465b376eccfee587ce2f648331ccbc)





More information about the Devel mailing list