View Issue Details

IDProjectCategoryView StatusLast Update
0005105secushare[All Projects] Generalpublic2019-02-20 12:56
ReporterlvernsAssigned To 
Status newResolutionopen 
Platformx86_64OSUbuntuOS Version16.04
Product Version 
Target VersionFixed in Version 
Summary0005105: passing insufficient arguments to gnunet-social causes a segmentation fault
DescriptionWhen running `gnunet-social --guest-talk`, additional flags are required. If they are not provided, an error message should be printed and the program should terminate with a non-zero exit code.

Currently, it segfaults.

The attached patch fixes the segfault. Instead, it just hangs forever. I believe that issue is unrelated to the patch and the segfault, but don't have any evidence to support that statement.
Steps To ReproduceRun `gnunet-social --guest-talk` with the system service running.
Additional InformationI'm using this Docker container: to run GNUnet. The host OS is NixOS 17.03
TagsNo tags attached.



2017-07-11 04:23


handle_null.patch (954 bytes)
diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c
index 0e52dccfa..0d17d5c5b 100644
--- a/src/social/gnunet-social.c
+++ b/src/social/gnunet-social.c
@@ -1164,7 +1164,6 @@ run (void *cls, char *const *args, const char *cfgfile,
                 _("--place missing or invalid.\n"));
-    /* FIXME: why does it segfault here? */
     exit_fail ();
diff --git a/src/social/social_api.c b/src/social/social_api.c
index af1d6e57e..ad8323d07 100644
--- a/src/social/social_api.c
+++ b/src/social/social_api.c
@@ -2693,6 +2693,11 @@ GNUNET_SOCIAL_app_disconnect (struct GNUNET_SOCIAL_App *app,
                               GNUNET_ContinuationCallback disconnect_cb,
                               void *disconnect_cls)
+  if (NULL == app){
+    // Nothing to free here!
+    return;
+  }
   app->disconnect_cb = disconnect_cb;
   app->disconnect_cls = disconnect_cls;
handle_null.patch (954 bytes)

Issue History

Date Modified Username Field Change
2017-07-11 04:23 lverns New Issue
2017-07-11 04:23 lverns File Added: handle_null.patch
2019-02-20 12:56 Christian Grothoff Project GNUnet => secushare
2019-02-20 12:56 Christian Grothoff Category other => General