mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* passphrase.c (agent_get_passphrase): Fix memory leak with symmetric
messages. Fix segfault with symmetric messages. Fix incorrect prompt with symmetric messages.
This commit is contained in:
parent
034bbc759f
commit
1dc153dfd2
2 changed files with 14 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-03-05 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* passphrase.c (agent_get_passphrase): Fix memory leak with
|
||||
symmetric messages. Fix segfault with symmetric messages. Fix
|
||||
incorrect prompt with symmetric messages.
|
||||
|
||||
2003-03-04 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* options.skel: Add explantion and commented-out
|
||||
|
|
|
@ -614,9 +614,12 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *tryagain_text )
|
|||
|
||||
memset (fpr, 0, MAX_FINGERPRINT_LEN );
|
||||
if( keyid && get_pubkey( pk, keyid ) )
|
||||
pk = NULL; /* oops: no key for some reason */
|
||||
{
|
||||
free_public_key( pk );
|
||||
pk = NULL; /* oops: no key for some reason */
|
||||
}
|
||||
|
||||
if ( !mode && pk )
|
||||
if ( !mode && pk && keyid )
|
||||
{
|
||||
char *uid;
|
||||
size_t uidlen;
|
||||
|
@ -658,10 +661,10 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *tryagain_text )
|
|||
}
|
||||
|
||||
}
|
||||
else if (mode == 1 )
|
||||
atext = m_strdup ( _("Enter passphrase\n") );
|
||||
else
|
||||
else if (mode == 2 )
|
||||
atext = m_strdup ( _("Repeat passphrase\n") );
|
||||
else
|
||||
atext = m_strdup ( _("Enter passphrase\n") );
|
||||
|
||||
if ( (fd = agent_open (&prot)) == -1 )
|
||||
goto failure;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue