summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-09-07 17:17:00 +0200
committerjospaeth <spaethj@in.tum.de>2020-09-07 17:17:00 +0200
commite12cdc513908ed0cf5acc73b7576a6ecbc9669ad (patch)
tree67f01f69a21dafe86ea4d8a8868ffaa2ea683899
parentc954b43a246d0c7c678d63b1f28afa949c205c12 (diff)
fix GNUNET_STRINGS_urlencode
did not use len parameter
-rw-r--r--src/util/strings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/strings.c b/src/util/strings.c
index 9d6f4039e..014302c01 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -2148,7 +2148,7 @@ GNUNET_STRINGS_urlencode (const char *data, size_t len, char **out)
struct GNUNET_Buffer buf = { 0 };
const uint8_t *i8 = (uint8_t *) data;
- while (0 != *i8)
+ while ((i8 - (uint8_t *) data) < len && 0 != *i8)
{
if (0 == (0x80 & *i8))
{