[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: log at least a bit on parse fail
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: log at least a bit on parse failures |
Date: |
Sat, 29 Aug 2020 11:41:42 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 2b9a2bb log at least a bit on parse failures
2b9a2bb is described below
commit 2b9a2bbe4d10e509a3a5d6ee7d961991a88d089b
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Aug 29 11:41:40 2020 +0200
log at least a bit on parse failures
---
src/lib/merchant_api_common.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/lib/merchant_api_common.c b/src/lib/merchant_api_common.c
index faa7a14..3c3c91f 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';
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: log at least a bit on parse failures,
gnunet <=