[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: fix #8044
From: |
gnunet |
Subject: |
[gnunet] branch master updated: fix #8044 |
Date: |
Tue, 09 Jan 2024 19:11:30 +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 bef6c0a6a fix #8044
bef6c0a6a is described below
commit bef6c0a6a62e9b4b364f25e498ec243b016b3e19
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jan 9 19:11:26 2024 +0100
fix #8044
---
src/lib/json/json_helper.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/lib/json/json_helper.c b/src/lib/json/json_helper.c
index 7e1d239f7..b6965e080 100644
--- a/src/lib/json/json_helper.c
+++ b/src/lib/json/json_helper.c
@@ -55,7 +55,7 @@ parse_fixed_data (void *cls,
struct GNUNET_JSON_Specification *spec)
{
const char *enc;
- unsigned int len;
+ size_t len;
if (NULL == (enc = json_string_value (root)))
{
@@ -63,6 +63,11 @@ parse_fixed_data (void *cls,
return GNUNET_SYSERR;
}
len = strlen (enc);
+ if (len >= SIZE_MAX / 5)
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
if (((len * 5) / 8) != spec->ptr_size)
{
GNUNET_break_op (0);
@@ -279,7 +284,7 @@ GNUNET_JSON_spec_string (const char *name,
{
struct GNUNET_JSON_Specification ret = {
.parser = &parse_string,
- .field = name,
+ .field = name,
.ptr = strptr
};
--
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 #8044,
gnunet <=