From 2f8afdcc5141c264588358e59c61068196acf961 Mon Sep 17 00:00:00 2001 From: Kurt Jaeger Date: Sun, 19 Aug 2018 14:38:07 +0000 Subject: math/sc-im: fix segmentation fault upon :wq - bug reported upstream as https://github.com/andmarti1424/sc-im/pull/280 PR: 227861 Submitted by: Samy Mahmoudi Approved by: bapt (maintainer timeout) --- math/sc-im/files/patch-cmds__command.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 math/sc-im/files/patch-cmds__command.c (limited to 'math/sc-im/files/patch-cmds__command.c') diff --git a/math/sc-im/files/patch-cmds__command.c b/math/sc-im/files/patch-cmds__command.c new file mode 100644 index 000000000000..31705a6e84b3 --- /dev/null +++ b/math/sc-im/files/patch-cmds__command.c @@ -0,0 +1,11 @@ +--- cmds_command.c.orig 2018-08-03 06:04:39 UTC ++++ cmds_command.c +@@ -826,7 +826,7 @@ void do_commandmode(struct block * sb) { + exec_cmd(line); + + } else if ( inputline[0] == L'w' ) { +- if (savefile() == 0 && ! wcscmp(inputline, L"wq")) shall_quit = 1; ++ if (savefile() == 0 && ! wcsncmp(inputline, L"wq", 2)) shall_quit = 1; + + } else if ( ! wcsncmp(inputline, L"file ", 5) ) { + -- cgit v1.2.3