help-gsasl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gsasl test tool crashes on OS X


From: Simon Josefsson
Subject: Re: gsasl test tool crashes on OS X
Date: Tue, 07 Feb 2012 15:10:39 +0100
User-agent: Gnus/5.130001 (Ma Gnus v0.1) Emacs/24.0.93 (gnu/linux)

Wim Lewis <address@hidden> writes:

> Gsasl (gsasl-1.6.1) crashes after reading a password. It doesn't look
> like this affects libgsasl, only the gsasl tool.
>
> The problem is it's freeing the pointer returned by getpass(), which is
> not a malloc'd pointer.

Hi Wim.  Thanks for the report.  I was able to reproduce the problem.

The solution is to use the 'getpass-gnu' gnulib module.  Then the gsasl
command line tool will use a getpass implementation from gnulib that
behaves like the glibc getpass function (i.e., allocates memory and
supports arbitrary sizes).

I have tested that this solves the problem on at least my Mac OS X 10.4
machine.

> OSX also has a readpassphrase() function (inherited from OpenBSD), which
> has better buffer handling, but is not POSIX.

The function requires a fixed-size buffers which seems sub-optimal.

Hopefully I'll be able to push out a 1.7.1 development release within
days, please test that it solves your problem.  Or you could try
building from git master, of course.

/Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]