aboutsummaryrefslogtreecommitdiff
path: root/src/gns
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-05-04 12:48:11 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-05-04 12:48:11 +0000
commit5cb80076be6f79e7bd58cc9e765bceec372b6e8b (patch)
treead7db86a3c152c60cd482c49e3feac83ae1b2afd /src/gns
parent160410f469ac69be5c5af5f74fec82a1dff4ba71 (diff)
downloadgnunet-5cb80076be6f79e7bd58cc9e765bceec372b6e8b.tar.gz
gnunet-5cb80076be6f79e7bd58cc9e765bceec372b6e8b.zip
-coverity
Diffstat (limited to 'src/gns')
-rw-r--r--src/gns/gnunet-service-gns_resolver.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 9959c43d5..3418e4463 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -1983,8 +1983,10 @@ process_delegation_result_ns(void* cls,
1983 rh->authority_chain_tail, 1983 rh->authority_chain_tail,
1984 auth); 1984 auth);
1985 1985
1986 /** try to import pkey if private key available */ 1986 /** try to import pkey if private key available
1987 if (rh->priv_key) 1987 * TODO: Only import last one?
1988 */
1989 if (rh->priv_key && (name != NULL))
1988 process_discovered_authority((char*)name, auth->zone, 1990 process_discovered_authority((char*)name, auth->zone,
1989 rh->authority_chain_tail->zone, 1991 rh->authority_chain_tail->zone,
1990 rh->priv_key); 1992 rh->priv_key);
@@ -2222,7 +2224,7 @@ process_zone_to_name_shorten(void *cls,
2222 struct AuthorityChain *next_authority; 2224 struct AuthorityChain *next_authority;
2223 2225
2224 char result[MAX_DNS_NAME_LENGTH]; 2226 char result[MAX_DNS_NAME_LENGTH];
2225 char next_authority_name[MAX_DNS_LABEL_LENGTH]; 2227 char tmp_name[MAX_DNS_NAME_LENGTH];
2226 size_t answer_len; 2228 size_t answer_len;
2227 2229
2228 /* we found a match in our own zone */ 2230 /* we found a match in our own zone */
@@ -2274,10 +2276,10 @@ process_zone_to_name_shorten(void *cls,
2274 */ 2276 */
2275 next_authority = rh->authority_chain_head; 2277 next_authority = rh->authority_chain_head;
2276 2278
2277 GNUNET_snprintf(next_authority_name, MAX_DNS_NAME_LENGTH, 2279 GNUNET_snprintf(tmp_name, MAX_DNS_NAME_LENGTH,
2278 "%s.%s", rh->name, next_authority->name); 2280 "%s.%s", rh->name, next_authority->name);
2279 2281
2280 strcpy(rh->name, next_authority_name); 2282 strcpy(rh->name, tmp_name);
2281 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2283 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2282 "No PSEU found for authority %s. Promoting back: %s\n", 2284 "No PSEU found for authority %s. Promoting back: %s\n",
2283 next_authority->name, rh->name); 2285 next_authority->name, rh->name);