summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-05-21 01:39:59 +0200
committerChristian Grothoff <christian@grothoff.org>2022-05-21 01:39:59 +0200
commitc471ae447b285c33ef51cd50b8e0cc36d9c0a794 (patch)
tree4d13d8750b0f87113dbc87a04dc19600d1a345f2 /src/util
parent81ad77b8dc6a90129ece7ef2c391aca83632d53a (diff)
downloadexchange-c471ae447b285c33ef51cd50b8e0cc36d9c0a794.tar.gz
exchange-c471ae447b285c33ef51cd50b8e0cc36d9c0a794.tar.bz2
exchange-c471ae447b285c33ef51cd50b8e0cc36d9c0a794.zip
-log where it failed
Diffstat (limited to 'src/util')
-rw-r--r--src/util/payto.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/payto.c b/src/util/payto.c
index 971e24961..442107a0f 100644
--- a/src/util/payto.c
+++ b/src/util/payto.c
@@ -107,16 +107,25 @@ TALER_xtalerbank_account_from_payto (const char *payto)
if (0 != strncasecmp (payto,
PAYTO "x-taler-bank/",
strlen (PAYTO "x-taler-bank/")))
+ {
+ GNUNET_break_op (0);
return NULL;
+ }
beg = strchr (&payto[strlen (PAYTO "x-taler-bank/")],
'/');
if (NULL == beg)
+ {
+ GNUNET_break_op (0);
return NULL;
+ }
beg++; /* now points to $ACCOUNT */
end = strchr (beg,
'?');
if (NULL == end)
+ {
+ GNUNET_break_op (0);
return GNUNET_strdup (beg); /* optional part is missing */
+ }
return GNUNET_strndup (beg,
end - beg);
}