1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-03 12:11:33 +01:00

common: Fix a build error when using adns.

* common/dns-cert.c (get_dns_cert) [USE_ADNS]: Fix synatx error.
--

(fixes commit 31f548a18aed729c05ea367f2d8a8104480430d5)

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2013-08-01 10:30:27 +02:00
parent f101f34fff
commit ffa7472db5

View File

@ -148,7 +148,7 @@ get_dns_cert (const char *name, estream_t *r_key,
goto leave; goto leave;
} }
else if (ctype == CERTTYPE_IPGP && datalen && datalen < 1023 else if (ctype == CERTTYPE_IPGP && datalen && datalen < 1023
&& datalen >= data[0] + 1 && fpr && fpr_len && url) && datalen >= data[0] + 1 && r_fpr && r_fprlen && r_url)
{ {
/* CERT type is IPGP. We made sure that the data is /* CERT type is IPGP. We made sure that the data is
plausible and that the caller requested this plausible and that the caller requested this
@ -170,7 +170,7 @@ get_dns_cert (const char *name, estream_t *r_key,
if (datalen > *r_fprlen + 1) if (datalen > *r_fprlen + 1)
{ {
*url = xtrymalloc (datalen - (*r_fprlen + 1) + 1); *r_url = xtrymalloc (datalen - (*r_fprlen + 1) + 1);
if (!*r_url) if (!*r_url)
{ {
err = gpg_err_make (default_errsource, err = gpg_err_make (default_errsource,
@ -179,8 +179,9 @@ get_dns_cert (const char *name, estream_t *r_key,
*r_fpr = NULL; *r_fpr = NULL;
goto leave; goto leave;
} }
memcpy (*url, data + (*r_fprlen + 1), datalen - (*r_fprlen + 1)); memcpy (*r_url,
(*url)[datalen - (*r_fprlen + 1)] = '\0'; data + (*r_fprlen + 1), datalen - (*r_fprlen + 1));
(*r_url)[datalen - (*r_fprlen + 1)] = '\0';
} }
else else
*r_url = NULL; *r_url = NULL;