[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#6634) potential leak when ARG_BERVAL|ARG_OFFSET

> Full_Name: Pierangelo Masarati
> Version: HEAD/re24
> OS: irrelevant
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (
> Submitted by: ando
> config_get_vals() in the above case first duplicates the berval from the
> pointer; then assigns it to "bv"; finally, it calls value_add_one(), which
> further duplicates the berval.  When ARG_STRING, instead, after the string
> is
> turned into a berval, ber_bvarray_add() is called.
> As far as I could tell, this only occurs for olcDbDirectory of back-ldif.

Things seem to be a little bit more complicated:

- when ARG_OFFSET && ARG_STRING, copy the string, then ber_bvarray_add()
- when ARG_MAGIC && ARG_STRING, ber_bvarray_add()
- when ARG_OFFSET && ARG_BERVAL, don't copy the string, value_add_one()
- when ARG_MAGIC && ARG_BERVAL, value_add_one()

A fix is coming.