1 From 795308b2452ee617da4096914b53ba3a1142e3db Mon Sep 17 00:00:00 2001
2 From: Matt Ranostay <matt.ranostay@konsulko.com>
3 Date: Fri, 6 Jul 2018 17:19:09 -0700
4 Subject: [PATCH] neardal: ncl: fix segfault on help page being displayed
6 LISTCMD_NAME is declared as a const char due to being defined in a
7 macro so g_strdup it to stop proceeding operations from segfaulting.
9 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
13 1 file changed, 1 insertion(+), 1 deletion(-)
15 diff --git a/ncl/ncl.c b/ncl/ncl.c
16 index 590d13b..f4165b7 100644
19 @@ -329,7 +329,7 @@ int main(int argc, char *argv[])
20 g_io_channel_unref(gNclCtx.channel);
23 - ncl_exec(LISTCMD_NAME);
24 + ncl_exec(g_strdup(LISTCMD_NAME));
26 rl_callback_handler_install(NCL_PROMPT, ncl_parse_line);