Update github.com git:// SRC_URIs
[AGL/meta-agl-demo.git] / recipes-connectivity / neardal / neardal / 0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch
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
5
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.
8
9 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
10
11 ---
12  ncl/ncl.c | 2 +-
13  1 file changed, 1 insertion(+), 1 deletion(-)
14
15 diff --git a/ncl/ncl.c b/ncl/ncl.c
16 index 590d13b..f4165b7 100644
17 --- a/ncl/ncl.c
18 +++ b/ncl/ncl.c
19 @@ -329,7 +329,7 @@ int main(int argc, char *argv[])
20                 g_io_channel_unref(gNclCtx.channel);
21  
22                 if (show_help)
23 -                       ncl_exec(LISTCMD_NAME);
24 +                       ncl_exec(g_strdup(LISTCMD_NAME));
25  
26                 rl_callback_handler_install(NCL_PROMPT, ncl_parse_line);
27