[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: FS: Fix segfault in URI handling
From: |
gnunet |
Subject: |
[gnunet] branch master updated: FS: Fix segfault in URI handling |
Date: |
Sat, 05 Mar 2022 08:59:00 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 2087b149d FS: Fix segfault in URI handling
2087b149d is described below
commit 2087b149d9a63eac15bbe9f03b0550d17d83eedb
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Sat Mar 5 08:58:51 2022 +0100
FS: Fix segfault in URI handling
---
src/fs/fs_uri.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 299dc3159..dff94ee26 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -644,6 +644,7 @@ struct GNUNET_FS_Uri *
GNUNET_FS_uri_parse (const char *uri, char **emsg)
{
struct GNUNET_FS_Uri *ret;
+ char *msg;
if (NULL == uri)
{
@@ -655,20 +656,25 @@ GNUNET_FS_uri_parse (const char *uri, char **emsg)
/**
* FIXME: Do we want to log this?
*/
- *emsg = NULL;
- if (NULL != (ret = uri_chk_parse (uri, emsg)))
+ msg = NULL;
+ if (NULL != (ret = uri_chk_parse (uri, &msg)))
return ret;
- GNUNET_free (*emsg);
- if (NULL != (ret = uri_ksk_parse (uri, emsg)))
+ if (NULL != msg)
+ GNUNET_free (msg);
+ if (NULL != (ret = uri_ksk_parse (uri, &msg)))
return ret;
- GNUNET_free (*emsg);
- if (NULL != (ret = uri_sks_parse (uri, emsg)))
+ if (NULL != msg)
+ GNUNET_free (msg);
+ if (NULL != (ret = uri_sks_parse (uri, &msg)))
return ret;
- GNUNET_free (*emsg);
- if (NULL != (ret = uri_loc_parse (uri, emsg)))
+ if (NULL != msg)
+ GNUNET_free (msg);
+ if (NULL != (ret = uri_loc_parse (uri, &msg)))
return ret;
- GNUNET_free (*emsg);
- *emsg = GNUNET_strdup (_ ("Unrecognized URI type"));
+ if (NULL != msg)
+ GNUNET_free (msg);
+ if (NULL != emsg)
+ *emsg = GNUNET_strdup (_ ("Unrecognized URI type"));
return NULL;
}
--
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: FS: Fix segfault in URI handling,
gnunet <=