[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: config: handle syntax error instead of d
From: |
gnunet |
Subject: |
[gnunet] branch master updated: config: handle syntax error instead of dereferencing NULL pointer |
Date: |
Fri, 30 Jul 2021 22:23:29 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new dccf60f89 config: handle syntax error instead of dereferencing NULL
pointer
dccf60f89 is described below
commit dccf60f8919c0ba5d97b9c8ffa774987bf46c5fe
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Jul 30 22:20:05 2021 +0200
config: handle syntax error instead of dereferencing NULL pointer
---
src/util/configuration.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/util/configuration.c b/src/util/configuration.c
index e515c7c46..8553d2b61 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -616,7 +616,7 @@ handle_inline (struct GNUNET_CONFIGURATION_Handle *cfg,
{
fun_ret = GNUNET_OK;
}
-cleanup:
+ cleanup:
cfg->current_nest_level = old_nest_level;
if (NULL != other_cfg)
GNUNET_CONFIGURATION_destroy (other_cfg);
@@ -890,6 +890,16 @@ GNUNET_CONFIGURATION_deserialize (struct
GNUNET_CONFIGURATION_Handle *cfg,
{
size_t i;
+ if (NULL == section)
+ {
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ _ (
+ "Syntax error while deserializing in line %u (option without
section)\n"),
+ nr);
+ ret = GNUNET_SYSERR;
+ break;
+ }
+
/* tag = value */
tag = GNUNET_strndup (line, eq - line);
/* remove tailing whitespace */
@@ -2300,7 +2310,7 @@ GNUNET_CONFIGURATION_load_from (struct
GNUNET_CONFIGURATION_Handle *cfg,
if (fun_ret != GNUNET_OK)
break;
}
-cleanup:
+ cleanup:
if (files_context.files_length > 0)
{
for (size_t i = 0; i < files_context.files_length; i++)
--
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: config: handle syntax error instead of dereferencing NULL pointer,
gnunet <=