diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-29 11:41:40 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-29 11:41:40 +0200 |
commit | 2b9a2bbe4d10e509a3a5d6ee7d961991a88d089b (patch) | |
tree | ca421333ef59ac1d81ecf60b5b133a02059f6903 /src | |
parent | 43d1009f4f333b9413866624eee3861d96da8a5c (diff) | |
download | merchant-2b9a2bbe4d10e509a3a5d6ee7d961991a88d089b.tar.gz merchant-2b9a2bbe4d10e509a3a5d6ee7d961991a88d089b.tar.bz2 merchant-2b9a2bbe4d10e509a3a5d6ee7d961991a88d089b.zip |
log at least a bit on parse failures
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/merchant_api_common.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/merchant_api_common.c b/src/lib/merchant_api_common.c index faa7a143..3c3c91fc 100644 --- a/src/lib/merchant_api_common.c +++ b/src/lib/merchant_api_common.c @@ -171,16 +171,18 @@ parse_taler_uri_scheme_action (const char *uri, then remove it */ char *path = strchr (scheme, ':'); - if ((NULL == path) || - (strlen (path) < 3)) + if ( (NULL == path) || + (strlen (path) < 3) ) { GNUNET_free (scheme); + GNUNET_break_op (0); return GNUNET_SYSERR; } - path += 3; + path += 3; /* make path point to 'pay' */ { char path_begin = *path; + *path = '\0'; if ((0 != strcmp ("taler://", scheme)) && @@ -188,6 +190,7 @@ parse_taler_uri_scheme_action (const char *uri, scheme))) { GNUNET_free (scheme); + GNUNET_break_op (0); return GNUNET_SYSERR; } *path = path_begin; @@ -195,9 +198,11 @@ parse_taler_uri_scheme_action (const char *uri, { char *pqf = strchr (path, '/'); + if (NULL == pqf) { GNUNET_free (scheme); + GNUNET_break_op (0); return GNUNET_SYSERR; } *pqf = '\0'; |