Skip to content

Commit

Permalink
Fix a possible crash when name is missing in a profile file
Browse files Browse the repository at this point in the history
  • Loading branch information
giox069 committed Sep 2, 2017
1 parent 09fbe27 commit 8f13dff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions remmina/src/remmina_applet_menu_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <glib/gprintf.h>
#include <string.h>
#include <stdarg.h>
#include "remmina_applet_menu_item.h"
Expand Down Expand Up @@ -108,6 +109,13 @@ GtkWidget* remmina_applet_menu_item_new(RemminaAppletMenuItemType item_type, ...
item->ssh_enabled = g_key_file_get_boolean(gkeyfile, "remmina", "ssh_enabled", NULL);

g_key_file_free(gkeyfile);

if (item->name == NULL) {
g_printf("WARNING: missing name= line in file %s. Skipping.\n", item->filename);
va_end(ap);
return NULL;
}

break;

case REMMINA_APPLET_MENU_ITEM_DISCOVERED:
Expand Down

0 comments on commit 8f13dff

Please sign in to comment.