From 2b9a2bbe4d10e509a3a5d6ee7d961991a88d089b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 29 Aug 2020 11:41:40 +0200 Subject: log at least a bit on parse failures --- src/lib/merchant_api_common.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/lib/merchant_api_common.c') 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'; -- cgit v1.2.3