aboutsummaryrefslogtreecommitdiff
path: root/src/abd
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-01-07 11:24:52 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-01-07 11:24:52 +0100
commitf92e35100123a64caee591ef6402c6edb4e90897 (patch)
tree39aa0eed3f76723427fda1e09726d15e9fc2dfb5 /src/abd
parent0ddc76385bb8c29389bcfad9f5737c518861a42c (diff)
downloadgnunet-f92e35100123a64caee591ef6402c6edb4e90897.tar.gz
gnunet-f92e35100123a64caee591ef6402c6edb4e90897.zip
-some input sanitization for identity and abd
Diffstat (limited to 'src/abd')
-rw-r--r--src/abd/gnunet-abd.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/abd/gnunet-abd.c b/src/abd/gnunet-abd.c
index cf3733abd..9f5fef958 100644
--- a/src/abd/gnunet-abd.c
+++ b/src/abd/gnunet-abd.c
@@ -560,6 +560,14 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
560 return; 560 return;
561 } 561 }
562 562
563 if (NULL == ego)
564 {
565 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
566 _("Ego does not exist!\n"));
567 GNUNET_SCHEDULER_shutdown ();
568 return;
569 }
570
563 // Key handling 571 // Key handling
564 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); 572 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
565 573
@@ -611,12 +619,12 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
611 { 619 {
612 if (typestring == NULL) 620 if (typestring == NULL)
613 { 621 {
614 fputs ("No value for unknown record type\n", stderr); 622 fputs ("Value for unknown record type not well-formed.\n", stderr);
615 } 623 }
616 else if (subject == NULL) 624 else if (subject == NULL)
617 { 625 {
618 fprintf (stderr, 626 fprintf (stderr,
619 "No value for record type`%s'\n", 627 "Value for record type `%s' not well-formed.\n",
620 typestring); 628 typestring);
621 } 629 }
622 else 630 else