[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: fix #8050
From: |
gnunet |
Subject: |
[gnunet] branch master updated: fix #8050 |
Date: |
Fri, 01 Mar 2024 12:32:35 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 08c15135e fix #8050
08c15135e is described below
commit 08c15135e8d2489376918a29a1563f63dbf47bb2
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Mar 1 12:32:32 2024 +0100
fix #8050
---
src/lib/util/strings.c | 31 ++++++++++++++++---------------
src/lib/util/test_regex.c | 6 +++++-
2 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/src/lib/util/strings.c b/src/lib/util/strings.c
index 96cd4352a..412dfb53a 100644
--- a/src/lib/util/strings.c
+++ b/src/lib/util/strings.c
@@ -37,7 +37,7 @@
#define LOG(kind, ...) GNUNET_log_from (kind, "util-strings", __VA_ARGS__)
#define LOG_STRERROR(kind, syscall) \
- GNUNET_log_from_strerror (kind, "util-strings", syscall)
+ GNUNET_log_from_strerror (kind, "util-strings", syscall)
size_t
@@ -1511,11 +1511,10 @@ GNUNET_STRINGS_parse_ipv6_policy (const char
*routeListX)
while (';' != routeList[pos])
pos++;
slash = pos;
- while ( (slash >= start) &&
+ while ( (slash > start) &&
(routeList[slash] != '/') )
slash--;
-
- if (slash < start)
+ if (slash <= start)
{
memset (&result[i].netmask,
0xFF,
@@ -1558,9 +1557,11 @@ GNUNET_STRINGS_parse_ipv6_policy (const char *routeListX)
(bits > 128) )
{
if (0 == ret)
+ {
LOG (GNUNET_ERROR_TYPE_WARNING,
_ ("Wrong format `%s' for netmask\n"),
- &routeList[slash + 1]);
+ &routeList[slash]);
+ }
else
{
errno = save;
@@ -1698,7 +1699,7 @@ GNUNET_STRINGS_base64url_encode (const void *in,
#define cvtfind(a) \
- ((((a) >= 'A') && ((a) <= 'Z')) \
+ ((((a) >= 'A') && ((a) <= 'Z')) \
? (a) - 'A' \
: (((a) >= 'a') && ((a) <= 'z')) \
? (a) - 'a' + 26 \
@@ -1708,15 +1709,15 @@ GNUNET_STRINGS_base64url_encode (const void *in,
#define CHECK_CRLF \
- while ( (data[i] == '\r') || (data[i] == '\n') ) \
- { \
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, \
- "ignoring CR/LF\n"); \
- i++; \
- if (i >= len) { \
- goto END; \
- } \
- }
+ while ( (data[i] == '\r') || (data[i] == '\n') ) \
+ { \
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, \
+ "ignoring CR/LF\n"); \
+ i++; \
+ if (i >= len) { \
+ goto END; \
+ } \
+ }
size_t
diff --git a/src/lib/util/test_regex.c b/src/lib/util/test_regex.c
index 968828755..789418fa0 100644
--- a/src/lib/util/test_regex.c
+++ b/src/lib/util/test_regex.c
@@ -109,10 +109,14 @@ test_policy6toregex (const char *policy,
r = GNUNET_TUN_ipv6policy2regex (policy);
if (NULL == r)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to parse `%s'\n",
+ policy);
GNUNET_break (0);
return 1;
}
- if (0 != strcmp (regex, r))
+ if (0 != strcmp (regex,
+ r))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Expected: `%s' but got: `%s'\n",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: fix #8050,
gnunet <=