mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
tools: Fix NULL deref in gpg-connect-agent.
* tools/gpg-connect-agent.c (handle_inquire): Do not pass NULL to strlen.
This commit is contained in:
parent
6c058fac65
commit
6376227a31
@ -1936,7 +1936,10 @@ handle_inquire (assuan_context_t ctx, char *line)
|
||||
if (d->is_var)
|
||||
{
|
||||
char *tmpvalue = get_var_ext (d->file);
|
||||
rc = assuan_send_data (ctx, tmpvalue, strlen (tmpvalue));
|
||||
if (tmpvalue)
|
||||
rc = assuan_send_data (ctx, tmpvalue, strlen (tmpvalue));
|
||||
else
|
||||
rc = assuan_send_data (ctx, "", 0);
|
||||
xfree (tmpvalue);
|
||||
if (rc)
|
||||
log_error ("sending data back failed: %s\n", gpg_strerror (rc) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user