[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: fix #6157
From: |
gnunet |
Subject: |
[gnunet] branch master updated: fix #6157 |
Date: |
Fri, 03 Apr 2020 18:54:44 +0200 |
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 6d7fd3328 fix #6157
6d7fd3328 is described below
commit 6d7fd3328a2ffe42ef52f914d913f1ee4d290adc
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Apr 3 18:50:09 2020 +0200
fix #6157
---
src/util/strings.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/util/strings.c b/src/util/strings.c
index be2ec33dc..9510b3b3b 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -972,14 +972,14 @@ GNUNET_STRINGS_string_to_data (const char *enc,
void *out,
size_t out_size)
{
- unsigned int rpos;
- unsigned int wpos;
+ size_t rpos;
+ size_t wpos;
unsigned int bits;
unsigned int vbit;
int ret;
int shift;
unsigned char *uout;
- unsigned int encoded_len = out_size * 8;
+ size_t encoded_len;
if (0 == enclen)
{
@@ -987,6 +987,8 @@ GNUNET_STRINGS_string_to_data (const char *enc,
return GNUNET_OK;
return GNUNET_SYSERR;
}
+ GNUNET_assert (out_size < SIZE_MAX / 8);
+ encoded_len = out_size * 8;
uout = out;
wpos = out_size;
rpos = enclen;
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: fix #6157,
gnunet <=