[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#6014) rev. 1.121 of clients/tools/common.c makes ldapmodify coredump
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#6014) rev. 1.121 of clients/tools/common.c makes ldapmodify coredump
- From: ando@sys-net.it
- Date: Thu, 12 Mar 2009 11:09:58 GMT
- Auto-submitted: auto-generated (OpenLDAP-ITS)
d@delphij.net wrote:
> Here is a patch that intends to fix #6014. getpassphrase() (which in
> turn would be a getpass() call, or lutil_getpass() call), returns a
> pointer from a static char * pointer, which should never be free()'ed.
> Therefore, a strdup() should be called.
>
> Note that, since both getpass() implementation could return NULL, we can
> not strdup() directly. Instead, we need to detect whether it's NULL and
> handle separately.
Probably, a better solution would be to implement a
lutil_get_terminal_password(char *prompt, struct berval *passwd)
routine that mallocs as appropriate.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Fax: +39 0382 476497
Email: ando@sys-net.it
-----------------------------------