[gnome-todo: 1/2] application: Terminate GOptionEntry with a NULL
- From: Mohammed Sadiq <pksadiq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo: 1/2] application: Terminate GOptionEntry with a NULL
- Date: Fri, 19 Jan 2018 02:04:58 +0000 (UTC)
commit 8a4f564fa550722ca58be41fe534ae4b59664d60
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Fri Jan 19 07:12:42 2018 +0530
application: Terminate GOptionEntry with a NULL
The last value in the GOptionEntry should be a NULL.
Otherwise it would read past the array causing strange
behavior including segfaults.
Let it be ended with a NULL to avoid undefined behaviors.
src/gtd-application.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/gtd-application.c b/src/gtd-application.c
index 7567b71..b5810c4 100644
--- a/src/gtd-application.c
+++ b/src/gtd-application.c
@@ -70,6 +70,7 @@ G_DEFINE_TYPE (GtdApplication, gtd_application, GTK_TYPE_APPLICATION)
static GOptionEntry cmd_options[] = {
{ "quit", 'q', 0, G_OPTION_ARG_NONE, NULL, N_("Quit GNOME To Do"), NULL },
{ "debug", 'd', 0, G_OPTION_ARG_NONE, NULL, N_("Enable debug messages"), NULL },
+ { NULL }
};
static const GActionEntry gtd_application_entries[] = {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]