[OpenSIPS-Devel] [OpenSIPS/opensips] 890ca7: Fix pkg mem leak by var spec copying

Bogdan Andrei IANCU noreply at github.com
Mon Nov 14 15:04:49 UTC 2022


  Branch: refs/heads/3.3
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 890ca7d712331a063086efd025e666919d488faf
      https://github.com/OpenSIPS/opensips/commit/890ca7d712331a063086efd025e666919d488faf
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2022-11-14 (Mon, 14 Nov 2022)

  Changed paths:
    M xlog.c

  Log Message:
  -----------
  Fix pkg mem leak by var spec copying

Commit fff57ac introduces a relativly useless memcpy (only for arm32 related). This copy of the var spec leaks the returned buffer containing the value of the spec, as per $dlg_val() - this implementation of the $dlg_val relys on the fact that the same spec will be received all the time, so a re-size-able buffer is attached to it.
So, let's get rif of the culprit memcpy and replace it with a simpler cast, as per 7dc20e471bf89eef0e4586adae26744d38c38c01
Credits and many thanks go to Arto Kuiri for reporting and pin pointing the culprit commit.

(cherry picked from commit f07e90aac92f33d3321d73ed69ca19850b7e10b4)





More information about the Devel mailing list