aboutsummaryrefslogtreecommitdiff
path: root/src/credential/gnunet-service-credential.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/credential/gnunet-service-credential.c')
-rw-r--r--src/credential/gnunet-service-credential.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/credential/gnunet-service-credential.c b/src/credential/gnunet-service-credential.c
index 9f7b60f1f..f07c777d6 100644
--- a/src/credential/gnunet-service-credential.c
+++ b/src/credential/gnunet-service-credential.c
@@ -476,11 +476,16 @@ start_backward_resolution (void* cls,
476 strcpy (issuer_attribute_name, 476 strcpy (issuer_attribute_name,
477 (char*)&vrh->current_attribute->data[1]); 477 (char*)&vrh->current_attribute->data[1]);
478 char *next_attr = strtok (issuer_attribute_name, "."); 478 char *next_attr = strtok (issuer_attribute_name, ".");
479 GNUNET_asprintf (&lookup_attr, 479 GNUNET_asprintf (&lookup_attr,
480 "%s.gnu", 480 "%s.gnu",
481 next_attr); 481 next_attr);
482 next_attr += strlen (next_attr) + 1; 482 if (strlen (next_attr) == strlen ((char*)&vrh->current_attribute->data[1]))
483 vrh->current_attribute->attr_trailer = GNUNET_strdup (next_attr); 483 {
484 vrh->current_attribute->attr_trailer = NULL;
485 } else {
486 next_attr += strlen (next_attr) + 1;
487 vrh->current_attribute->attr_trailer = GNUNET_strdup (next_attr);
488 }
484 489
485 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 490 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
486 "Looking up %s\n", lookup_attr); 491 "Looking up %s\n", lookup_attr);