Fredrik Thulin <[email protected]> writes:

>> The following working patch clearly shows the problem.
> ...
>> +  f = NULL;
>
> Do you say that the patch *solves* the problem, or that it reproduces
> the problem reliably?

Looking at the code, I think there is a double-fclose going on, and my
reading of the patch above, it would solve it.

On line 525 of pam_yubico.c (in git master) the variable f is closed,
but f is not set to NULL afterwards, so calling fclose (f) again will
crash, and indeed this will happen if any step afterwards fails and the
'goto out' is invoked, which contains 'if (f) fclose (f);'.  The reason
it doesn't always crash is that the variable f is re-used to open
another file further down, and for that file, the handle is fclose'd
properly and f is set to NULL.

/Simon



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to